summaryrefslogtreecommitdiff
path: root/trafgen_parser.y
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2016-12-18 11:52:48 +0200
committerTobias Klauser <tklauser@distanz.ch>2016-12-21 16:57:23 +0100
commit44e97b2009dc2bee93f25684b274f458f50ea667 (patch)
tree174d2d5c94801e1295f987529adb58b457e231a2 /trafgen_parser.y
parent7925eea97dfbe30b87217c6db9c6326f4eb66324 (diff)
trafgen: parser: Parse IPv6 address by strict match pattern
Used IPv6 pattern from nftables project [1] to match valid only IPv6 address to do not mess with MAC or other syntax patterns with ':' symbol. [1] http://git.netfilter.org/nftables/tree/src/scanner.l Signed-off-by: Vadim Kochan <vadim4j@gmail.com> [tk: add refrence to nftables source] Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'trafgen_parser.y')
-rw-r--r--trafgen_parser.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/trafgen_parser.y b/trafgen_parser.y
index bfeed2e..a1b8b0c 100644
--- a/trafgen_parser.y
+++ b/trafgen_parser.y
@@ -416,7 +416,7 @@ static void proto_field_expr_eval(void)
else if (field->len == 4)
proto_hdr_field_set_be32(hdr, field->id, field_expr.val.number);
else
- bug();
+ proto_hdr_field_set_bytes(hdr, field->id, field_expr.val.bytes);
break;
case FIELD_EXPR_MAC: