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

Commit cff533ac authored by Jan Engelhardt's avatar Jan Engelhardt Committed by David S. Miller
Browse files

[NETFILTER]: x_tables: switch hotdrop to bool



Switch the "hotdrop" variables to boolean

Signed-off-by: default avatarJan Engelhardt <jengelh@gmx.de>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7bfe2461
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ struct xt_match
		     const void *matchinfo,
		     int offset,
		     unsigned int protoff,
		     int *hotdrop);
		     bool *hotdrop);

	/* Called when user tries to insert an entry of this type. */
	/* Should return true or false. */
+1 −1
Original line number Diff line number Diff line
@@ -224,7 +224,7 @@ unsigned int arpt_do_table(struct sk_buff **pskb,
	static const char nulldevname[IFNAMSIZ];
	unsigned int verdict = NF_DROP;
	struct arphdr *arp;
	int hotdrop = 0;
	bool hotdrop = false;
	struct arpt_entry *e, *back;
	const char *indev, *outdev;
	void *table_base;
+4 −4
Original line number Diff line number Diff line
@@ -188,7 +188,7 @@ int do_match(struct ipt_entry_match *m,
	     const struct net_device *in,
	     const struct net_device *out,
	     int offset,
	     int *hotdrop)
	     bool *hotdrop)
{
	/* Stop iteration if it doesn't match */
	if (!m->u.kernel.match->match(skb, in, out, m->u.kernel.match, m->data,
@@ -216,7 +216,7 @@ ipt_do_table(struct sk_buff **pskb,
	u_int16_t offset;
	struct iphdr *ip;
	u_int16_t datalen;
	int hotdrop = 0;
	bool hotdrop = false;
	/* Initializing verdict to NF_DROP keeps gcc happy. */
	unsigned int verdict = NF_DROP;
	const char *indev, *outdev;
@@ -2122,7 +2122,7 @@ icmp_match(const struct sk_buff *skb,
	   const void *matchinfo,
	   int offset,
	   unsigned int protoff,
	   int *hotdrop)
	   bool *hotdrop)
{
	struct icmphdr _icmph, *ic;
	const struct ipt_icmp *icmpinfo = matchinfo;
@@ -2137,7 +2137,7 @@ icmp_match(const struct sk_buff *skb,
		 * can't.  Hence, no choice but to drop.
		 */
		duprintf("Dropping evil ICMP tinygram.\n");
		*hotdrop = 1;
		*hotdrop = true;
		return 0;
	}

+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ static inline int match_type(__be32 addr, u_int16_t mask)
static int match(const struct sk_buff *skb,
		 const struct net_device *in, const struct net_device *out,
		 const struct xt_match *match, const void *matchinfo,
		 int offset, unsigned int protoff, int *hotdrop)
		 int offset, unsigned int protoff, bool *hotdrop)
{
	const struct ipt_addrtype_info *info = matchinfo;
	const struct iphdr *iph = ip_hdr(skb);
+2 −2
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ match(const struct sk_buff *skb,
      const void *matchinfo,
      int offset,
      unsigned int protoff,
      int *hotdrop)
      bool *hotdrop)
{
	struct ip_auth_hdr _ahdr, *ah;
	const struct ipt_ah *ahinfo = matchinfo;
@@ -60,7 +60,7 @@ match(const struct sk_buff *skb,
		 * can't.  Hence, no choice but to drop.
		 */
		duprintf("Dropping evil AH tinygram.\n");
		*hotdrop = 1;
		*hotdrop = true;
		return 0;
	}

Loading