From 229b6208c5201b41bccf91d317e55e4cdec16921 Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Wed, 22 May 1996 10:15:15 +0000 Subject: [PATCH] Put back filter for server port --- bpf.c | 5 +++++ common/bpf.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/bpf.c b/bpf.c index dd773f38..526fed08 100644 --- a/bpf.c +++ b/bpf.c @@ -207,6 +207,11 @@ void if_register_receive (info, interface) p.bf_len = sizeof filter / sizeof (struct bpf_insn); p.bf_insns = filter; + /* Patch the server port into the BPF program... + XXX changes to filter program may require changes + to the insn number(s) used below! XXX */ + filter [8].k = ntohs (server_port); + if (ioctl (info -> rfdesc, BIOCSETF, &p) < 0) error ("Can't install packet filter program: %m"); note ("Listening on BPF/%s/%s/%s", diff --git a/common/bpf.c b/common/bpf.c index dd773f38..526fed08 100644 --- a/common/bpf.c +++ b/common/bpf.c @@ -207,6 +207,11 @@ void if_register_receive (info, interface) p.bf_len = sizeof filter / sizeof (struct bpf_insn); p.bf_insns = filter; + /* Patch the server port into the BPF program... + XXX changes to filter program may require changes + to the insn number(s) used below! XXX */ + filter [8].k = ntohs (server_port); + if (ioctl (info -> rfdesc, BIOCSETF, &p) < 0) error ("Can't install packet filter program: %m"); note ("Listening on BPF/%s/%s/%s",