Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d930594 authored by David S. Miller's avatar David S. Miller
Browse files
parents 738faca3 96120d86
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -270,7 +270,8 @@ struct nf_afinfo {
					    unsigned int dataoff,
					    unsigned int dataoff,
					    unsigned int len,
					    unsigned int len,
					    u_int8_t protocol);
					    u_int8_t protocol);
	int		(*route)(struct dst_entry **dst, struct flowi *fl);
	int		(*route)(struct net *net, struct dst_entry **dst,
				 struct flowi *fl, bool strict);
	void		(*saveroute)(const struct sk_buff *skb,
	void		(*saveroute)(const struct sk_buff *skb,
				     struct nf_queue_entry *entry);
				     struct nf_queue_entry *entry);
	int		(*reroute)(struct sk_buff *skb,
	int		(*reroute)(struct sk_buff *skb,
+1 −1
Original line number Original line Diff line number Diff line
@@ -293,7 +293,7 @@ struct ip_set {
	/* Lock protecting the set data */
	/* Lock protecting the set data */
	rwlock_t lock;
	rwlock_t lock;
	/* References to the set */
	/* References to the set */
	atomic_t ref;
	u32 ref;
	/* The core set type */
	/* The core set type */
	struct ip_set_type *type;
	struct ip_set_type *type;
	/* The type variant doing the real job */
	/* The type variant doing the real job */
+1 −2
Original line number Original line Diff line number Diff line
@@ -515,8 +515,7 @@ type_pf_head(struct ip_set *set, struct sk_buff *skb)
	if (h->netmask != HOST_MASK)
	if (h->netmask != HOST_MASK)
		NLA_PUT_U8(skb, IPSET_ATTR_NETMASK, h->netmask);
		NLA_PUT_U8(skb, IPSET_ATTR_NETMASK, h->netmask);
#endif
#endif
	NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES,
	NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, htonl(set->ref - 1));
		      htonl(atomic_read(&set->ref) - 1));
	NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE, htonl(memsize));
	NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE, htonl(memsize));
	if (with_timeout(h->timeout))
	if (with_timeout(h->timeout))
		NLA_PUT_NET32(skb, IPSET_ATTR_TIMEOUT, htonl(h->timeout));
		NLA_PUT_NET32(skb, IPSET_ATTR_TIMEOUT, htonl(h->timeout));
+1 −1
Original line number Original line Diff line number Diff line
@@ -52,7 +52,7 @@ static inline struct net *skb_net(const struct sk_buff *skb)
	 */
	 */
	if (likely(skb->dev && skb->dev->nd_net))
	if (likely(skb->dev && skb->dev->nd_net))
		return dev_net(skb->dev);
		return dev_net(skb->dev);
	if (skb_dst(skb)->dev)
	if (skb_dst(skb) && skb_dst(skb)->dev)
		return dev_net(skb_dst(skb)->dev);
		return dev_net(skb_dst(skb)->dev);
	WARN(skb->sk, "Maybe skb_sknet should be used in %s() at line:%d\n",
	WARN(skb->sk, "Maybe skb_sknet should be used in %s() at line:%d\n",
		      __func__, __LINE__);
		      __func__, __LINE__);
+3 −2
Original line number Original line Diff line number Diff line
@@ -221,9 +221,10 @@ static __sum16 nf_ip_checksum_partial(struct sk_buff *skb, unsigned int hook,
	return csum;
	return csum;
}
}


static int nf_ip_route(struct dst_entry **dst, struct flowi *fl)
static int nf_ip_route(struct net *net, struct dst_entry **dst,
		       struct flowi *fl, bool strict __always_unused)
{
{
	struct rtable *rt = ip_route_output_key(&init_net, &fl->u.ip4);
	struct rtable *rt = ip_route_output_key(net, &fl->u.ip4);
	if (IS_ERR(rt))
	if (IS_ERR(rt))
		return PTR_ERR(rt);
		return PTR_ERR(rt);
	*dst = &rt->dst;
	*dst = &rt->dst;
Loading