diff options
author | Andrew Thompson <thompsa@FreeBSD.org> | 2012-03-07 07:22:53 +0000 |
---|---|---|
committer | Andrew Thompson <thompsa@FreeBSD.org> | 2012-03-07 07:22:53 +0000 |
commit | cd613b635128f2737d31ce49fbadceb36636f9e0 (patch) | |
tree | 5906303337693e952c9085e8b84f815d45bd2f19 /sys/net | |
parent | c8e72d0c6f4c27e635f24f7e61188e9f45f1ca3b (diff) | |
download | src-cd613b635128f2737d31ce49fbadceb36636f9e0.tar.gz src-cd613b635128f2737d31ce49fbadceb36636f9e0.zip |
Move the vlan buffer space into the union which also fixes an unused variable
warning with !INET & !INET6.
Spotted by: pluknet
Notes
Notes:
svn path=/head/; revision=232640
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_lagg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 892a256aaea8..ba19c52dadad 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -1438,7 +1438,6 @@ lagg_hashmbuf(struct lagg_softc *sc, struct mbuf *m, uint32_t key) uint32_t p = key; int off; struct ether_header *eh; - struct ether_vlan_header vlanbuf; const struct ether_vlan_header *vlan; #ifdef INET const struct ip *ip; @@ -1456,6 +1455,7 @@ lagg_hashmbuf(struct lagg_softc *sc, struct mbuf *m, uint32_t key) #ifdef INET6 struct ip6_hdr ip6; #endif + struct ether_vlan_header vlan; uint32_t port; } buf; @@ -1475,7 +1475,7 @@ lagg_hashmbuf(struct lagg_softc *sc, struct mbuf *m, uint32_t key) p = hash32_buf(&m->m_pkthdr.ether_vtag, sizeof(m->m_pkthdr.ether_vtag), p); } else if (etype == ETHERTYPE_VLAN) { - vlan = lagg_gethdr(m, off, sizeof(*vlan), &vlanbuf); + vlan = lagg_gethdr(m, off, sizeof(*vlan), &buf); if (vlan == NULL) goto out; |