Skip to content

Commit

Permalink
avoid compiler warning (u_int16_t never goes over MAXPACKET). sync w/…
Browse files Browse the repository at this point in the history
… openbsd
  • Loading branch information
itojun committed Jul 12, 2003
1 parent 5e74baf commit c9e96bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kame/sys/net/pf_norm.c
Expand Up @@ -991,12 +991,12 @@ pf_normalize_ip(struct mbuf **m0, int dir, struct ifnet *ifp, u_short *reason)
goto bad;
}

max = fragoff + ip_len;
/* Respect maximum length */
if (max > IP_MAXPACKET) {
DPFPRINTF(("max packet %d\n", max));
if (fragoff + ip_len > IP_MAXPACKET) {
DPFPRINTF(("max packet %d\n", fragoff + ip_len));
goto bad;
}
max = fragoff + ip_len;

if ((r->rule_flag & (PFRULE_FRAGCROP|PFRULE_FRAGDROP)) == 0) {
/* Fully buffer all of the fragments */
Expand Down

0 comments on commit c9e96bb

Please sign in to comment.