[HECnet] New bridge version

Oleg Safiullin form at pdp-11.org.ru
Mon Nov 21 18:24:11 PST 2011


On 11/22/2011 02:25 AM, Johnny Billquist wrote:
Ok. After some whacky hacking to merge what Hans sent me, I've uploaded a new version at http://www.update.uu.se/~bqt/hecnet

o Update for OpenBSD to avoid loops.
o Drop MAX() definition - it isn't used


--- bridge.c.orig             Tue Nov 22 02:17:15 2011
+++ bridge.c       Tue Nov 22 09:21:34 2011
@@ -70,8 +70,6 @@
#define ETHERTYPE_MOPRC 0x6002
#define ETHERTYPE_LOOPBACK 0x9000

-#define MAX(a,b) (a>b?a:b)
-
/* This is a very simple and small program for bpf that just
      filters out anything by any protocol that we *know* we're
      not interested in.
@@ -248,6 +246,13 @@
              perror("BIOCSHDRCMPLT");
              exit(1);
            }
+#ifdef __OpenBSD__
+           i = BPF_DIRECTION_OUT;
+           if (ioctl(bridge[bcnt].fd,BIOCSDIRFILT,&i)) {
+               perror("BIOCSDIRFILT");
+               exit(1);
+           }
+#endif
#endif

            found = -1;



More information about the Hecnet-list mailing list