#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <syslog.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <netinet/in.h>
struct bstr *a;
int align, nh_len;
unsigned long key, mask, offmask = 0, offset;
- struct tc_u32_key u_key;
-
- memset(&u_key, 0, sizeof(u_key));
+ struct tc_u32_key u_key = {};
#define PARSE_ERR(CARG, FMT, ARGS...) \
- em_parse_error(EINVAL, args, CARG, &u32_ematch_util, FMT ,##ARGS)
+ em_parse_error(EINVAL, args, CARG, &u32_ematch_util, FMT, ##ARGS)
if (args == NULL)
return PARSE_ERR(args, "u32: missing arguments");
nh_len = strlen("nexthdr+");
if (a->len > nh_len && !memcmp(a->data, "nexthdr+", nh_len)) {
char buf[a->len - nh_len + 1];
+
offmask = -1;
memcpy(buf, a->data + nh_len, a->len - nh_len);
offset = strtoul(buf, NULL, 0);