Commit 53e26658 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[NETFILTER]: nfnetlink: remove unnecessary packed attributes

Remove unnecessary packed attributes in nfnetlink structures. Unfortunately
in a few cases they have to stay to avoid changing structure sizes.
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent efa74165
...@@ -43,7 +43,7 @@ struct nfattr ...@@ -43,7 +43,7 @@ struct nfattr
u_int16_t nfa_len; u_int16_t nfa_len;
u_int16_t nfa_type; /* we use 15 bits for the type, and the highest u_int16_t nfa_type; /* we use 15 bits for the type, and the highest
* bit to indicate whether the payload is nested */ * bit to indicate whether the payload is nested */
} __attribute__ ((packed)); };
/* FIXME: Apart from NFNL_NFA_NESTED shamelessly copy and pasted from /* FIXME: Apart from NFNL_NFA_NESTED shamelessly copy and pasted from
* rtnetlink.h, it's time to put this in a generic file */ * rtnetlink.h, it's time to put this in a generic file */
...@@ -79,7 +79,7 @@ struct nfgenmsg { ...@@ -79,7 +79,7 @@ struct nfgenmsg {
u_int8_t nfgen_family; /* AF_xxx */ u_int8_t nfgen_family; /* AF_xxx */
u_int8_t version; /* nfnetlink version */ u_int8_t version; /* nfnetlink version */
u_int16_t res_id; /* resource id */ u_int16_t res_id; /* resource id */
} __attribute__ ((packed)); };
#define NFNETLINK_V0 0 #define NFNETLINK_V0 0
......
...@@ -19,18 +19,18 @@ struct nfulnl_msg_packet_hdr { ...@@ -19,18 +19,18 @@ struct nfulnl_msg_packet_hdr {
u_int16_t hw_protocol; /* hw protocol (network order) */ u_int16_t hw_protocol; /* hw protocol (network order) */
u_int8_t hook; /* netfilter hook */ u_int8_t hook; /* netfilter hook */
u_int8_t _pad; u_int8_t _pad;
} __attribute__ ((packed)); };
struct nfulnl_msg_packet_hw { struct nfulnl_msg_packet_hw {
u_int16_t hw_addrlen; u_int16_t hw_addrlen;
u_int16_t _pad; u_int16_t _pad;
u_int8_t hw_addr[8]; u_int8_t hw_addr[8];
} __attribute__ ((packed)); };
struct nfulnl_msg_packet_timestamp { struct nfulnl_msg_packet_timestamp {
aligned_u64 sec; aligned_u64 sec;
aligned_u64 usec; aligned_u64 usec;
} __attribute__ ((packed)); };
#define NFULNL_PREFIXLEN 30 /* just like old log target */ #define NFULNL_PREFIXLEN 30 /* just like old log target */
......
...@@ -22,12 +22,12 @@ struct nfqnl_msg_packet_hw { ...@@ -22,12 +22,12 @@ struct nfqnl_msg_packet_hw {
u_int16_t hw_addrlen; u_int16_t hw_addrlen;
u_int16_t _pad; u_int16_t _pad;
u_int8_t hw_addr[8]; u_int8_t hw_addr[8];
} __attribute__ ((packed)); };
struct nfqnl_msg_packet_timestamp { struct nfqnl_msg_packet_timestamp {
aligned_u64 sec; aligned_u64 sec;
aligned_u64 usec; aligned_u64 usec;
} __attribute__ ((packed)); };
enum nfqnl_attr_type { enum nfqnl_attr_type {
NFQA_UNSPEC, NFQA_UNSPEC,
...@@ -49,7 +49,7 @@ enum nfqnl_attr_type { ...@@ -49,7 +49,7 @@ enum nfqnl_attr_type {
struct nfqnl_msg_verdict_hdr { struct nfqnl_msg_verdict_hdr {
u_int32_t verdict; u_int32_t verdict;
u_int32_t id; u_int32_t id;
} __attribute__ ((packed)); };
enum nfqnl_msg_config_cmds { enum nfqnl_msg_config_cmds {
...@@ -64,7 +64,7 @@ struct nfqnl_msg_config_cmd { ...@@ -64,7 +64,7 @@ struct nfqnl_msg_config_cmd {
u_int8_t command; /* nfqnl_msg_config_cmds */ u_int8_t command; /* nfqnl_msg_config_cmds */
u_int8_t _pad; u_int8_t _pad;
u_int16_t pf; /* AF_xxx for PF_[UN]BIND */ u_int16_t pf; /* AF_xxx for PF_[UN]BIND */
} __attribute__ ((packed)); };
enum nfqnl_config_mode { enum nfqnl_config_mode {
NFQNL_COPY_NONE, NFQNL_COPY_NONE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment