1 diff -pNur veth-1.0/veth/vethd.c veth-1.0/veth/vethd.c
2 --- veth-1.0/veth/vethd.c 2008-11-14 10:59:50.000000000 +0100
3 +++ veth-1.0/veth/vethd.c 2008-11-24 11:24:45.000000000 +0100
5 #include <linux/if_ether.h>
6 #include <linux/if_packet.h>
7 #include <linux/if_tun.h>
8 +#include <net/ethernet.h>
10 #define max(a,b) ((a)>(b) ? (a):(b))
12 @@ -223,6 +224,7 @@ int main(int argc, char **argv)
14 int vfd, nfd, leidos, opc, foreground = 0;
16 + struct ether_header const* const ether_hdr = (struct ether_header const *)buffer;
20 @@ -356,7 +358,11 @@ int main(int argc, char **argv)
21 perror("Error reading from ethernet interface");
24 - write(vfd, buffer, leidos);
25 + /* drop multicast and ppp session */
26 + if (!(ether_hdr->ether_dhost[0] == 0x01)
27 + && (ether_hdr->ether_type != htons(ETH_P_PPP_SES))) {
28 + write(vfd, buffer, leidos);