]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
proto: fix arpop symbol table endianess
authorPatrick McHardy <kaber@trash.net>
Wed, 25 Nov 2015 16:51:10 +0000 (16:51 +0000)
committerPatrick McHardy <kaber@trash.net>
Wed, 25 Nov 2015 16:51:10 +0000 (16:51 +0000)
The symbols need to be in big endian.

Signed-off-by: Patrick McHardy <kaber@trash.net>
src/proto.c

index 89ec2821beb643cba7dc138c712ff562352adf25..0fe0b88e2add370543a1de85b1bd6a61b395490b 100644 (file)
@@ -668,13 +668,13 @@ const struct proto_desc proto_inet_service = {
 
 static const struct symbol_table arpop_tbl = {
        .symbols        = {
-               SYMBOL("request",       ARPOP_REQUEST),
-               SYMBOL("reply",         ARPOP_REPLY),
-               SYMBOL("rrequest",      ARPOP_RREQUEST),
-               SYMBOL("rreply",        ARPOP_RREPLY),
-               SYMBOL("inrequest",     ARPOP_InREQUEST),
-               SYMBOL("inreply",       ARPOP_InREPLY),
-               SYMBOL("nak",           ARPOP_NAK),
+               SYMBOL("request",       __constant_htons(ARPOP_REQUEST)),
+               SYMBOL("reply",         __constant_htons(ARPOP_REPLY)),
+               SYMBOL("rrequest",      __constant_htons(ARPOP_RREQUEST)),
+               SYMBOL("rreply",        __constant_htons(ARPOP_RREPLY)),
+               SYMBOL("inrequest",     __constant_htons(ARPOP_InREQUEST)),
+               SYMBOL("inreply",       __constant_htons(ARPOP_InREPLY)),
+               SYMBOL("nak",           __constant_htons(ARPOP_NAK)),
                SYMBOL_LIST_END
        },
 };