diff options
-rw-r--r-- | include/network.h | 1 | ||||
-rw-r--r-- | src/parse.c | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/include/network.h b/include/network.h index 6ab099f..3f8123d 100644 --- a/include/network.h +++ b/include/network.h @@ -196,6 +196,7 @@ enum nta_attr { NTA_SPAT_PORT, /* uint16_t */ NTA_DPAT_PORT, /* uint16_t */ NTA_NAT_SEQ_ADJ = 16, /* struct nta_attr_natseqadj */ + NTA_MAX }; struct nta_attr_natseqadj { diff --git a/src/parse.c b/src/parse.c index 0184c5a..4eb74b2 100644 --- a/src/parse.c +++ b/src/parse.c @@ -35,7 +35,7 @@ struct parser { int attr; }; -static struct parser h[ATTR_MAX] = { +static struct parser h[NTA_MAX] = { [NTA_IPV4] = { .parse = parse_group, .attr = ATTR_GRP_ORIG_IPV4, @@ -76,6 +76,10 @@ static struct parser h[ATTR_MAX] = { .parse = parse_group, .attr = ATTR_GRP_MASTER_IPV6, }, + [NTA_MASTER_L4PROTO] = { + .parse = parse_u8, + .attr = ATTR_MASTER_L4PROTO, + }, [NTA_MASTER_PORT] = { .parse = parse_group, .attr = ATTR_GRP_MASTER_PORT, |