Bug #3737 ยป if_vlan.diff
if_vlan.c 2014-07-27 12:25:19.000000000 +0200 | ||
---|---|---|
117 | 117 |
int ifvm_mintu; /* min transmission unit */ |
118 | 118 |
uint16_t ifvm_proto; /* encapsulation ethertype */ |
119 | 119 |
uint16_t ifvm_tag; /* tag to apply on packets leaving if */ |
120 |
uint16_t ifvm_vid; /* VLAN ID */ |
|
120 | 121 |
uint8_t ifvm_pcp; /* Priority Code Point (PCP). */ |
121 | 122 |
} ifv_mib; |
122 | 123 |
SLIST_HEAD(, vlan_mc_entry) vlan_mc_listhead; |
... | ... | |
125 | 126 |
#endif |
126 | 127 |
}; |
127 | 128 |
#define ifv_proto ifv_mib.ifvm_proto |
128 |
#define ifv_vid ifv_mib.ifvm_tag |
|
129 |
#define ifv_tag ifv_mib.ifvm_tag |
|
130 |
#define ifv_vid ifv_mib.ifvm_vid |
|
129 | 131 |
#define ifv_pcp ifv_mib.ifvm_pcp |
130 | 132 |
#define ifv_encaplen ifv_mib.ifvm_encaplen |
131 | 133 |
#define ifv_mtufudge ifv_mib.ifvm_mtufudge |
... | ... | |
715 | 717 |
vlan_tag_recalculate(struct ifvlan *ifv) |
716 | 718 |
{ |
717 | 719 | |
718 |
ifv->ifv_mib.ifvm_tag = EVL_MAKETAG(ifv->ifv_vid, ifv->ifv_pcp, 0);
|
|
720 |
ifv->ifv_tag = EVL_MAKETAG(ifv->ifv_vid, ifv->ifv_pcp, 0); |
|
719 | 721 |
} |
720 | 722 | |
721 | 723 |
/* |
... | ... | |
1113 | 1115 |
MTAG_8021Q_PCP_OUT, NULL)) != NULL) |
1114 | 1116 |
tag = EVL_MAKETAG(ifv->ifv_vid, *(uint8_t *)(mtag + 1), 0); |
1115 | 1117 |
else |
1116 |
tag = EVL_MAKETAG(ifv->ifv_vid, ifv->ifv_pcp, 0);
|
|
1118 |
tag = ifv->ifv_tag;
|
|
1117 | 1119 |
if (p->if_capenable & IFCAP_VLAN_HWTAGGING) { |
1118 | 1120 |
m->m_pkthdr.ether_vtag = tag; |
1119 | 1121 |
m->m_flags |= M_VLANTAG; |