History

ipset: drop ipset_nest_start() and ipset_nest_end()

After the previous commit, both ipset_nest_start() and ipset_nest_end() are just aliases for nla_nest_start() and nla_nest_end() so that there is no need to keep them.

Michal Kubecek committed 7 years ago

Commit 12ad5f61 parent ae0be8d4 files · +25 −28Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/netfilter/ipset/ip_set.h+4−7
@@ -401,33 +401,30 @@ ip_set_get_h16(const struct nlattr *attr) · 400 unmodified lines
401 return ntohs(nla_get_be16(attr));401 return ntohs(nla_get_be16(attr));
402}402}
403 403
404#define ipset_nest_start(skb, attr) nla_nest_start(skb, attr)
405#define ipset_nest_end(skb, start) nla_nest_end(skb, start)
406
407static inline int nla_put_ipaddr4(struct sk_buff *skb, int type, __be32 ipaddr)404static inline int nla_put_ipaddr4(struct sk_buff *skb, int type, __be32 ipaddr)
408{405{
409 struct nlattr *__nested = ipset_nest_start(skb, type);406 struct nlattr *__nested = nla_nest_start(skb, type);
410 int ret;407 int ret;
411 408
412 if (!__nested)409 if (!__nested)
413 return -EMSGSIZE;410 return -EMSGSIZE;
414 ret = nla_put_in_addr(skb, IPSET_ATTR_IPADDR_IPV4, ipaddr);411 ret = nla_put_in_addr(skb, IPSET_ATTR_IPADDR_IPV4, ipaddr);
415 if (!ret)412 if (!ret)
416 ipset_nest_end(skb, __nested);413 nla_nest_end(skb, __nested);
417 return ret;414 return ret;
418}415}
419 416
420static inline int nla_put_ipaddr6(struct sk_buff *skb, int type,417static inline int nla_put_ipaddr6(struct sk_buff *skb, int type,
421 const struct in6_addr *ipaddrptr)418 const struct in6_addr *ipaddrptr)
422{419{
423 struct nlattr *__nested = ipset_nest_start(skb, type);420 struct nlattr *__nested = nla_nest_start(skb, type);
424 int ret;421 int ret;
425 422
426 if (!__nested)423 if (!__nested)
427 return -EMSGSIZE;424 return -EMSGSIZE;
428 ret = nla_put_in6_addr(skb, IPSET_ATTR_IPADDR_IPV6, ipaddrptr);425 ret = nla_put_in6_addr(skb, IPSET_ATTR_IPADDR_IPV6, ipaddrptr);
429 if (!ret)426 if (!ret)
430 ipset_nest_end(skb, __nested);427 nla_nest_end(skb, __nested);
431 return ret;428 return ret;
432}429}
433 430

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t