Skip to content

Commit 53e2665

Browse files
kaberDavid S. Miller
authored andcommitted
[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: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent efa7416 commit 53e2665

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

include/linux/netfilter/nfnetlink.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct nfattr
4343
u_int16_t nfa_len;
4444
u_int16_t nfa_type; /* we use 15 bits for the type, and the highest
4545
* bit to indicate whether the payload is nested */
46-
} __attribute__ ((packed));
46+
};
4747

4848
/* FIXME: Apart from NFNL_NFA_NESTED shamelessly copy and pasted from
4949
* rtnetlink.h, it's time to put this in a generic file */
@@ -79,7 +79,7 @@ struct nfgenmsg {
7979
u_int8_t nfgen_family; /* AF_xxx */
8080
u_int8_t version; /* nfnetlink version */
8181
u_int16_t res_id; /* resource id */
82-
} __attribute__ ((packed));
82+
};
8383

8484
#define NFNETLINK_V0 0
8585

include/linux/netfilter/nfnetlink_log.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ struct nfulnl_msg_packet_hdr {
1919
u_int16_t hw_protocol; /* hw protocol (network order) */
2020
u_int8_t hook; /* netfilter hook */
2121
u_int8_t _pad;
22-
} __attribute__ ((packed));
22+
};
2323

2424
struct nfulnl_msg_packet_hw {
2525
u_int16_t hw_addrlen;
2626
u_int16_t _pad;
2727
u_int8_t hw_addr[8];
28-
} __attribute__ ((packed));
28+
};
2929

3030
struct nfulnl_msg_packet_timestamp {
3131
aligned_u64 sec;
3232
aligned_u64 usec;
33-
} __attribute__ ((packed));
33+
};
3434

3535
#define NFULNL_PREFIXLEN 30 /* just like old log target */
3636

include/linux/netfilter/nfnetlink_queue.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ struct nfqnl_msg_packet_hw {
2222
u_int16_t hw_addrlen;
2323
u_int16_t _pad;
2424
u_int8_t hw_addr[8];
25-
} __attribute__ ((packed));
25+
};
2626

2727
struct nfqnl_msg_packet_timestamp {
2828
aligned_u64 sec;
2929
aligned_u64 usec;
30-
} __attribute__ ((packed));
30+
};
3131

3232
enum nfqnl_attr_type {
3333
NFQA_UNSPEC,
@@ -49,7 +49,7 @@ enum nfqnl_attr_type {
4949
struct nfqnl_msg_verdict_hdr {
5050
u_int32_t verdict;
5151
u_int32_t id;
52-
} __attribute__ ((packed));
52+
};
5353

5454

5555
enum nfqnl_msg_config_cmds {
@@ -64,7 +64,7 @@ struct nfqnl_msg_config_cmd {
6464
u_int8_t command; /* nfqnl_msg_config_cmds */
6565
u_int8_t _pad;
6666
u_int16_t pf; /* AF_xxx for PF_[UN]BIND */
67-
} __attribute__ ((packed));
67+
};
6868

6969
enum nfqnl_config_mode {
7070
NFQNL_COPY_NONE,

0 commit comments

Comments
 (0)