Skip to content

Commit

Permalink
Fix padding field not initialized issue
Browse files Browse the repository at this point in the history
"u16" is enough for vlan_tci and vlan_proto fields and can
avoid the padding issue.
  • Loading branch information
ruicao93 authored and chenhengqi committed Sep 20, 2022
1 parent ca5fd8e commit 8a35ac0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/networking/vlan_learning/vlan_learning.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

struct ifindex_leaf_t {
int out_ifindex;
int vlan_tci; // populated by phys2virt and used by virt2phys
int vlan_proto; // populated by phys2virt and used by virt2phys
u16 vlan_tci; // populated by phys2virt and used by virt2phys
u16 vlan_proto; // populated by phys2virt and used by virt2phys
u64 tx_pkts;
u64 tx_bytes;
};
Expand Down

0 comments on commit 8a35ac0

Please sign in to comment.