secnet has no reassembly code and logs whenever it receives fragments.
Change this to only log when receiving initial fragments; this reduces
noise in the log.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
}
h=(struct icmphdr *)buf->start;
}
h=(struct icmphdr *)buf->start;
- if ((ntohs(h->iph.frag)&(IPHDR_FRAG_OFF|IPHDR_FRAG_MORE))!=0) {
- Message(M_WARNING,"%s: fragmented packet addressed to secnet; "
- "ignoring it\n",st->name);
+ unsigned fraginfo = ntohs(h->iph.frag);
+ if ((fraginfo&(IPHDR_FRAG_OFF|IPHDR_FRAG_MORE))!=0) {
+ if (!(fraginfo & IPHDR_FRAG_OFF))
+ /* report only for first fragment */
+ Message(M_WARNING,"%s: fragmented packet addressed to secnet; "
+ "ignoring it\n",st->name);