Add and use nfnl_msg_type() function to replace opencoded nfnetlink message type. I suggested this change, Arushi Singhal made an initial patch to address this but was missing several spots.
Showing the changes to include/linux/netfilter (1 of 11 files). Show all
Unified · Split
| @@ -41,6 +41,11 @@ int nfnetlink_set_err(struct net *net, u32 portid, u32 group, int error); · 40 unmodified lines | |||
| 41 | int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u32 portid, | 41 | int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u32 portid, |
| 42 | int flags); | 42 | int flags); |
| 43 | 43 | ||
| 44 | static inline u16 nfnl_msg_type(u8 subsys, u8 msg_type) | ||
| 45 | { | ||
| 46 | return subsys << 8 | msg_type; | ||
| 47 | } | ||
| 48 | |||
| 44 | void nfnl_lock(__u8 subsys_id); | 49 | void nfnl_lock(__u8 subsys_id); |
| 45 | void nfnl_unlock(__u8 subsys_id); | 50 | void nfnl_unlock(__u8 subsys_id); |
| 46 | #ifdef CONFIG_PROVE_LOCKING | 51 | #ifdef CONFIG_PROVE_LOCKING |