-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Vxlan tunnel 7717 v2.4 #14820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vxlan tunnel 7717 v2.4 #14820
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -550,7 +550,7 @@ typedef struct Packet_ | |
| uint32_t flow_hash; | ||
|
|
||
| /* tunnel type: none, root or child */ | ||
| enum PacketTunnelType ttype; | ||
| uint8_t ttype; // enum PacketTunnelType | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably also move it to the first cacheline, as there is a 2 byte gap there and this field should also not change after it has been set. uint8_t proto; /* 44 1 */
uint8_t recursion_level; /* 45 1 */
uint16_t vlan_id[3]; /* 46 6 */
uint8_t vlan_idx; /* 52 1 */
uint8_t flowflags; /* 53 1 */
uint8_t app_update_direction; /* 54 1 */
uint8_t sig_mask; /* 55 1 */
uint16_t pkt_hooks; /* 56 2 */
/* XXX 2 bytes hole, try to pack */
// MOVE HERE?
uint32_t flags; /* 60 4 */
/* --- cacheline 1 boundary (64 bytes) --- */
struct Flow_ * flow; /* 64 8 */
uint32_t flow_hash; /* 72 4 */
uint8_t ttype; /* 76 1 */
/* XXX 3 bytes hole, try to pack */
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool |
||
|
|
||
| SCTime_t ts; | ||
|
|
||
|
|
@@ -1102,6 +1102,7 @@ enum DecodeTunnelProto { | |
| DECODE_TUNNEL_ETHERNET, | ||
| DECODE_TUNNEL_ERSPANII, | ||
| DECODE_TUNNEL_ERSPANI, | ||
| DECODE_TUNNEL_VXLAN, | ||
| DECODE_TUNNEL_VLAN, | ||
| DECODE_TUNNEL_IPV4, | ||
| DECODE_TUNNEL_IPV6, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -413,6 +413,18 @@ int EBPFLoadFile(const char *iface, const char *path, const char * section, | |
| SCLogError("Too many BPF maps in eBPF files"); | ||
| break; | ||
| } | ||
| if (strcmp(bpf_map__name(map), "flow_table_v4") == 0) { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See https://github.com/OISF/suricata/pull/14820/changes#r2811731591 I wonder if we should add some magic for padding/alignment... |
||
| if (bpf_map__key_size(map) != sizeof(struct flowv4_keys)) { | ||
| SCLogError("Incompatible flow_table_v4"); | ||
| break; | ||
| } | ||
| } | ||
| if (strcmp(bpf_map__name(map), "flow_table_v6") == 0) { | ||
| if (bpf_map__key_size(map) != sizeof(struct flowv6_keys)) { | ||
| SCLogError("Incompatible flow_table_v6"); | ||
| break; | ||
| } | ||
| } | ||
| SCLogDebug("Got a map '%s' with fd '%d'", bpf_map__name(map), bpf_map__fd(map)); | ||
| bpf_map_data->array[bpf_map_data->last].fd = bpf_map__fd(map); | ||
| bpf_map_data->array[bpf_map_data->last].name = SCStrdup(bpf_map__name(map)); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.