diff options
author | yar <yar@FreeBSD.org> | 2005-08-31 11:36:50 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2005-08-31 11:36:50 +0000 |
commit | a8babb6361f498ad4ec130129442557417062299 (patch) | |
tree | 84a8bfd45590a638afe97a040f869b58ff7e417d /sys/net/if_vlan.c | |
parent | a895ee1c0503a8b4640b891719cb1d32e96ef528 (diff) | |
download | FreeBSD-src-a8babb6361f498ad4ec130129442557417062299.zip FreeBSD-src-a8babb6361f498ad4ec130129442557417062299.tar.gz |
Use VLAN_TAG_VALUE() not only to read a dot1q tag
value from an m_tag, but also to set it. This reduces
complex code duplication and improves its readability.
Alas, we shouldn't rename the macro to VLAN_TAG_LVALUE()
globally because that would cause pain for kernel module
port maintainers and vendors using FreeBSD as their codebase.
Added a clarifying comment instead.
Discussed with: ru, glebius
X-MFC-After: 6.0-RELEASE (MFC is good just to reduce the diff)
Diffstat (limited to 'sys/net/if_vlan.c')
-rw-r--r-- | sys/net/if_vlan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 5a8fafe..758800a 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -502,7 +502,7 @@ vlan_start(struct ifnet *ifp) m_freem(m); continue; } - *(u_int*)(mtag + 1) = ifv->ifv_tag; + VLAN_TAG_VALUE(mtag) = ifv->ifv_tag; m_tag_prepend(m, mtag); m->m_flags |= M_VLANTAG; } else { |