Skip to content
Snippets Groups Projects
Commit ad6daee7 authored by Markus Gothe's avatar Markus Gothe :ok_hand:
Browse files

Solve warnings.

parent 6c188fa3
No related branches found
No related tags found
No related merge requests found
Pipeline #190661 passed
...@@ -101,8 +101,8 @@ static void add_igmpv3_entry(const struct iphdr *ih, __be16 protocol, unsigned s ...@@ -101,8 +101,8 @@ static void add_igmpv3_entry(const struct iphdr *ih, __be16 protocol, unsigned s
igmp->ivid = ivid; igmp->ivid = ivid;
igmp->saddr = ih->saddr; igmp->saddr = ih->saddr;
igmp->group = group; igmp->group = group;
strcpy(igmp->br, br_port_get_rcu(xt_in(par))->br->dev->name); /* Save name instead of pointer to device, the latter might disappear from the system. */ strcpy(igmp->br, br_port_get_rcu(xt_in(par))->br->dev->name); /* Save name instead of pointer to device, the latter might disappear from the system. */ // flawfinder: ignore
strcpy(igmp->port, xt_inname(par)); strcpy(igmp->port, xt_inname(par)); // flawfinder: ignore
if (protocol == htons(ETH_P_PPP_SES)) if (protocol == htons(ETH_P_PPP_SES))
igmp->isPPPoE = true; igmp->isPPPoE = true;
igmp->version = 3; igmp->version = 3;
...@@ -221,8 +221,8 @@ static inline bool ebt_ip_mt(const struct iphdr *ih, struct sk_buff *skb, __be16 ...@@ -221,8 +221,8 @@ static inline bool ebt_ip_mt(const struct iphdr *ih, struct sk_buff *skb, __be16
igmp->ivid = ivid; igmp->ivid = ivid;
igmp->saddr = ih->saddr; igmp->saddr = ih->saddr;
igmp->group = pptr->group; igmp->group = pptr->group;
strcpy(igmp->br, br_port_get_rcu(xt_in(par))->br->dev->name); /* Save name instead of pointer to device, the latter might disappear from the system. */ strcpy(igmp->br, br_port_get_rcu(xt_in(par))->br->dev->name); /* Save name instead of pointer to device, the latter might disappear from the system. */ // flawfinder: ignore
strcpy(igmp->port, xt_inname(par)); strcpy(igmp->port, xt_inname(par)); // flawfinder: ignore
if (protocol == htons(ETH_P_PPP_SES)) if (protocol == htons(ETH_P_PPP_SES))
igmp->isPPPoE = true; igmp->isPPPoE = true;
if (pptr->type == IGMPV2_HOST_MEMBERSHIP_REPORT) if (pptr->type == IGMPV2_HOST_MEMBERSHIP_REPORT)
...@@ -287,8 +287,8 @@ again: ...@@ -287,8 +287,8 @@ again:
protocol = vlan->h_vlan_encapsulated_proto; protocol = vlan->h_vlan_encapsulated_proto;
ivid = (ntohs(vlan->h_vlan_TCI) & VLAN_VID_MASK); ivid = (ntohs(vlan->h_vlan_TCI) & VLAN_VID_MASK);
skb_pull(skb, VLAN_HLEN); skb_pull((struct sk_buff *)skb, VLAN_HLEN);
skb_reset_network_header(skb); skb_reset_network_header((struct sk_buff *)skb);
vlan_hdr_count++; vlan_hdr_count++;
} }
goto again; goto again;
...@@ -301,13 +301,13 @@ again: ...@@ -301,13 +301,13 @@ again:
} }
/* Business logic goes here */ /* Business logic goes here */
ret = ebt_ip_mt(iph, skb, protocol, ovid, ivid, par); ret = ebt_ip_mt(iph, (struct sk_buff *)skb, protocol, ovid, ivid, par);
out: out:
/* Restore the skb for the pulled VLAN tags */ /* Restore the skb for the pulled VLAN tags */
while (vlan_hdr_count--) { while (vlan_hdr_count--) {
skb_push(skb, VLAN_HLEN); skb_push((struct sk_buff *)skb, VLAN_HLEN);
skb_reset_network_header(skb); skb_reset_network_header((struct sk_buff *)skb);
} }
return ret; return ret;
...@@ -341,8 +341,9 @@ static int igmp_device_event(struct notifier_block *unused, unsigned long event, ...@@ -341,8 +341,9 @@ static int igmp_device_event(struct notifier_block *unused, unsigned long event,
case NETDEV_CHANGE: case NETDEV_CHANGE:
if (netif_carrier_ok(dev)) if (netif_carrier_ok(dev))
return NOTIFY_DONE; return NOTIFY_DONE;
/* fall through */ fallthrough;
case NETDEV_UNREGISTER: /* fall through */ case NETDEV_UNREGISTER:
fallthrough;
case NETDEV_DOWN: case NETDEV_DOWN:
spin_lock_bh(&igmp_lock); spin_lock_bh(&igmp_lock);
list_for_each_safe(cur, next, &igmp_info_list) { list_for_each_safe(cur, next, &igmp_info_list) {
......
...@@ -103,8 +103,8 @@ static void add_mldv2_entry(const struct ipv6hdr *ih6, __be16 protocol, unsigned ...@@ -103,8 +103,8 @@ static void add_mldv2_entry(const struct ipv6hdr *ih6, __be16 protocol, unsigned
mld->ivid = ivid; mld->ivid = ivid;
mld->saddr = ih6->saddr; mld->saddr = ih6->saddr;
mld->group = *group; mld->group = *group;
strcpy(mld->br, br_port_get_rcu(xt_in(par))->br->dev->name); /* Save name instead of pointer to device, the latter might disappear from the system. */ strcpy(mld->br, br_port_get_rcu(xt_in(par))->br->dev->name); /* Save name instead of pointer to device, the latter might disappear from the system. */ // flawfinder: ignore
strcpy(mld->port, xt_inname(par)); strcpy(mld->port, xt_inname(par)); // flawfinder: ignore
if (protocol == htons(ETH_P_PPP_SES)) if (protocol == htons(ETH_P_PPP_SES))
mld->isPPPoE = true; mld->isPPPoE = true;
mld->version = 2; mld->version = 2;
...@@ -233,8 +233,8 @@ static inline bool ebt_ip6_mt(const struct ipv6hdr *ih6, struct sk_buff *skb, __ ...@@ -233,8 +233,8 @@ static inline bool ebt_ip6_mt(const struct ipv6hdr *ih6, struct sk_buff *skb, __
mld->ivid = ivid; mld->ivid = ivid;
mld->saddr = ih6->saddr; mld->saddr = ih6->saddr;
mld->group = pptr->mld_mca; mld->group = pptr->mld_mca;
strcpy(mld->br, br_port_get_rcu(xt_in(par))->br->dev->name); /* Save name instead of pointer to device, the latter might disappear from the system. */ strcpy(mld->br, br_port_get_rcu(xt_in(par))->br->dev->name); /* Save name instead of pointer to device, the latter might disappear from the system. */ // flawfinder: ignore
strcpy(mld->port, xt_inname(par)); strcpy(mld->port, xt_inname(par)); // flawfinder: ignore
if (protocol == htons(ETH_P_PPP_SES)) if (protocol == htons(ETH_P_PPP_SES))
mld->isPPPoE = true; mld->isPPPoE = true;
mld->version = 1; mld->version = 1;
...@@ -251,7 +251,7 @@ static inline bool ebt_ip6_mt(const struct ipv6hdr *ih6, struct sk_buff *skb, __ ...@@ -251,7 +251,7 @@ static inline bool ebt_ip6_mt(const struct ipv6hdr *ih6, struct sk_buff *skb, __
return true; return true;
} }
static bool ebt_mld_mt(struct sk_buff *skb, struct xt_action_param *par) static bool ebt_mld_mt(const struct sk_buff *skb, struct xt_action_param *par)
{ {
const struct ipv6hdr *ipv6h = NULL; const struct ipv6hdr *ipv6h = NULL;
struct ipv6hdr _ipv6h; struct ipv6hdr _ipv6h;
...@@ -297,8 +297,8 @@ again: ...@@ -297,8 +297,8 @@ again:
protocol = vlan->h_vlan_encapsulated_proto; protocol = vlan->h_vlan_encapsulated_proto;
ivid = (ntohs(vlan->h_vlan_TCI) & VLAN_VID_MASK); ivid = (ntohs(vlan->h_vlan_TCI) & VLAN_VID_MASK);
skb_pull(skb, VLAN_HLEN); skb_pull((struct sk_buff *)skb, VLAN_HLEN);
skb_reset_network_header(skb); skb_reset_network_header((struct sk_buff *)skb);
vlan_hdr_count++; vlan_hdr_count++;
} }
goto again; goto again;
...@@ -311,13 +311,13 @@ again: ...@@ -311,13 +311,13 @@ again:
} }
/* Business logic goes here */ /* Business logic goes here */
ret = ebt_ip6_mt(ipv6h, skb, protocol, ovid, ivid, par); ret = ebt_ip6_mt(ipv6h, (struct sk_buff *)skb, protocol, ovid, ivid, par);
out: out:
/* Restore the skb for the pulled VLAN tags */ /* Restore the skb for the pulled VLAN tags */
while (vlan_hdr_count--) { while (vlan_hdr_count--) {
skb_push(skb, VLAN_HLEN); skb_push((struct sk_buff *)skb, VLAN_HLEN);
skb_reset_network_header(skb); skb_reset_network_header((struct sk_buff *)skb);
} }
return ret; return ret;
...@@ -351,8 +351,9 @@ static int mld_device_event(struct notifier_block *unused, unsigned long event, ...@@ -351,8 +351,9 @@ static int mld_device_event(struct notifier_block *unused, unsigned long event,
case NETDEV_CHANGE: case NETDEV_CHANGE:
if (netif_carrier_ok(dev)) if (netif_carrier_ok(dev))
return NOTIFY_DONE; return NOTIFY_DONE;
/* fall through */ fallthrough;
case NETDEV_UNREGISTER: /* fall through */ case NETDEV_UNREGISTER:
fallthrough;
case NETDEV_DOWN: case NETDEV_DOWN:
spin_lock_bh(&mld_lock); spin_lock_bh(&mld_lock);
list_for_each_safe(cur, next, &mld_info_list) { list_for_each_safe(cur, next, &mld_info_list) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment