2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-30 05:47:45 +00:00

Put back filter for server port

This commit is contained in:
Ted Lemon 1996-05-22 10:15:15 +00:00
parent e29c53f6f0
commit 229b6208c5
2 changed files with 10 additions and 0 deletions

5
bpf.c
View File

@ -207,6 +207,11 @@ void if_register_receive (info, interface)
p.bf_len = sizeof filter / sizeof (struct bpf_insn); p.bf_len = sizeof filter / sizeof (struct bpf_insn);
p.bf_insns = filter; 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) if (ioctl (info -> rfdesc, BIOCSETF, &p) < 0)
error ("Can't install packet filter program: %m"); error ("Can't install packet filter program: %m");
note ("Listening on BPF/%s/%s/%s", note ("Listening on BPF/%s/%s/%s",

View File

@ -207,6 +207,11 @@ void if_register_receive (info, interface)
p.bf_len = sizeof filter / sizeof (struct bpf_insn); p.bf_len = sizeof filter / sizeof (struct bpf_insn);
p.bf_insns = filter; 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) if (ioctl (info -> rfdesc, BIOCSETF, &p) < 0)
error ("Can't install packet filter program: %m"); error ("Can't install packet filter program: %m");
note ("Listening on BPF/%s/%s/%s", note ("Listening on BPF/%s/%s/%s",