Skip to content

Commit

Permalink
Merge pull request #4289 from cold-brewed/pcap-filter
Browse files Browse the repository at this point in the history
Modify the PCAP filter to allow multicast packets
  • Loading branch information
OBattler authored Mar 21, 2024
2 parents d3039c2 + a776a54 commit a02118c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/network/net_pcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ net_pcap_init(const netcard_t *card, const uint8_t *mac_addr, void *priv, char *
pcap_log("PCAP: installing filter for MAC=%02x:%02x:%02x:%02x:%02x:%02x\n",
mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);
sprintf(filter_exp,
"( ((ether dst ff:ff:ff:ff:ff:ff) or (ether dst %02x:%02x:%02x:%02x:%02x:%02x)) and not (ether src %02x:%02x:%02x:%02x:%02x:%02x) )",
"( ((ether broadcast) or (ether multicast) or (ether dst %02x:%02x:%02x:%02x:%02x:%02x)) and not (ether src %02x:%02x:%02x:%02x:%02x:%02x) )",
mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5],
mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);
if (f_pcap_compile(pcap->pcap, &fp, filter_exp, 0, 0xffffffff) != -1) {
Expand Down

1 comment on commit a02118c

@neozeed
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified it works wtih my NetBEUI setup! I can now map drives & use mailslots between OS/2 1.21, 2.0 & MS-DOS Windows 3.1!

Monitor_1_20240324-011436-435

Please sign in to comment.