The current code incorrectly assumes that all vlans

are configured, and/or associated with a parent device.  If you
receive a frame for a VLAN that's not in the list, you walk off
the end of the list.  Boom.

Submitted by:	C. Stephen Gunn <csg@waterspout.com>
PR:		15291
This commit is contained in:
Jordan K. Hubbard 1999-12-13 01:57:00 +00:00
parent ae290324a4
commit c0230c1b3d
2 changed files with 4 additions and 5 deletions

View File

@ -285,9 +285,8 @@ vlan_input_tag(struct ether_header *eh, struct mbuf *m, u_int16_t t)
}
if (i >= NVLAN || (ifv->ifv_if.if_flags & IFF_UP) == 0) {
m_freem(m);
ifv->ifv_p->if_data.ifi_noproto++;
return;
m_free(m);
return -1; /* So the parent can take note */
}
/*
@ -312,7 +311,7 @@ vlan_input_tag(struct ether_header *eh, struct mbuf *m, u_int16_t t)
}
ifv->ifv_if.if_ipackets++;
ether_input(&ifv->ifv_if, eh, m);
return;
return 0;
}
int

View File

@ -85,7 +85,7 @@ struct vlanreq {
/* shared with if_ethersubr.c: */
extern u_int vlan_proto;
extern int vlan_input(struct ether_header *eh, struct mbuf *m);
extern void vlan_input_tag(struct ether_header *eh,
extern int vlan_input_tag(struct ether_header *eh,
struct mbuf *m, u_int16_t t);
#endif