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:
parent
e29c53f6f0
commit
229b6208c5
5
bpf.c
5
bpf.c
@ -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",
|
||||||
|
@ -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",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user