summaryrefslogtreecommitdiff
path: root/sys/src/9/ip/icmp.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2019-03-07 22:39:50 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2019-03-07 22:39:50 +0100
commit4b8f7a2110d80fdad0f09f376dbfd2204e2e8f8e (patch)
treede1716025d3e3a5a61967dfe196f8d7299094a06 /sys/src/9/ip/icmp.c
parent4885c75526f91ff9eb245b32a63512e2e67b3038 (diff)
devip: ignore the evil bit in fragment info field
using ~IP_DF mask to select offset and "more fragments" bits includes the evil bit 15. so instead define a constant IP_FO for the fragment offset bits and use (IP_MF|IP_FO). that way the evil bit gets ignored and doesnt cause any useless calls to ipreassemble().
Diffstat (limited to 'sys/src/9/ip/icmp.c')
-rw-r--r--sys/src/9/ip/icmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/ip/icmp.c b/sys/src/9/ip/icmp.c
index 90c289f4b..5a2a810e8 100644
--- a/sys/src/9/ip/icmp.c
+++ b/sys/src/9/ip/icmp.c
@@ -401,7 +401,7 @@ icmpiput(Proto *icmp, Ipifc*, Block *bp)
goto raise;
}
p = (Icmp *)bp->rp;
- if((nhgets(p->frag) & ~(IP_DF|IP_MF)) == 0){
+ if((nhgets(p->frag) & IP_FO) == 0){
pr = Fsrcvpcolx(icmp->f, p->proto);
if(pr != nil && pr->advise != nil) {
(*pr->advise)(pr, bp, msg);