aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/netfilter/ipvs/ip_vs_xmit.c2
-rw-r--r--net/netfilter/nf_tables_api.c1
-rw-r--r--net/netfilter/xt_LED.c10
3 files changed, 9 insertions, 4 deletions
diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
index 73ba1cc7a88d..6f70bdd3a90a 100644
--- a/net/netfilter/ipvs/ip_vs_xmit.c
+++ b/net/netfilter/ipvs/ip_vs_xmit.c
@@ -967,8 +967,8 @@ ip_vs_tunnel_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
967 iph->nexthdr = IPPROTO_IPV6; 967 iph->nexthdr = IPPROTO_IPV6;
968 iph->payload_len = old_iph->payload_len; 968 iph->payload_len = old_iph->payload_len;
969 be16_add_cpu(&iph->payload_len, sizeof(*old_iph)); 969 be16_add_cpu(&iph->payload_len, sizeof(*old_iph));
970 iph->priority = old_iph->priority;
971 memset(&iph->flow_lbl, 0, sizeof(iph->flow_lbl)); 970 memset(&iph->flow_lbl, 0, sizeof(iph->flow_lbl));
971 ipv6_change_dsfield(iph, 0, ipv6_get_dsfield(old_iph));
972 iph->daddr = cp->daddr.in6; 972 iph->daddr = cp->daddr.in6;
973 iph->saddr = saddr; 973 iph->saddr = saddr;
974 iph->hop_limit = old_iph->hop_limit; 974 iph->hop_limit = old_iph->hop_limit;
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 8746ff9a8357..b35ba833e13c 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -3218,6 +3218,7 @@ static int nft_del_setelem(struct nft_ctx *ctx, struct nft_set *set,
3218 if (set->flags & NFT_SET_MAP) 3218 if (set->flags & NFT_SET_MAP)
3219 nft_data_uninit(&elem.data, set->dtype); 3219 nft_data_uninit(&elem.data, set->dtype);
3220 3220
3221 return 0;
3221err2: 3222err2:
3222 nft_data_uninit(&elem.key, desc.type); 3223 nft_data_uninit(&elem.key, desc.type);
3223err1: 3224err1:
diff --git a/net/netfilter/xt_LED.c b/net/netfilter/xt_LED.c
index 993de2ba89d3..92c71cdc4739 100644
--- a/net/netfilter/xt_LED.c
+++ b/net/netfilter/xt_LED.c
@@ -50,11 +50,14 @@ struct xt_led_info_internal {
50 struct timer_list timer; 50 struct timer_list timer;
51}; 51};
52 52
53#define XT_LED_BLINK_DELAY 50 /* ms */
54
53static unsigned int 55static unsigned int
54led_tg(struct sk_buff *skb, const struct xt_action_param *par) 56led_tg(struct sk_buff *skb, const struct xt_action_param *par)
55{ 57{
56 const struct xt_led_info *ledinfo = par->targinfo; 58 const struct xt_led_info *ledinfo = par->targinfo;
57 struct xt_led_info_internal *ledinternal = ledinfo->internal_data; 59 struct xt_led_info_internal *ledinternal = ledinfo->internal_data;
60 unsigned long led_delay = XT_LED_BLINK_DELAY;
58 61
59 /* 62 /*
60 * If "always blink" is enabled, and there's still some time until the 63 * If "always blink" is enabled, and there's still some time until the
@@ -62,9 +65,10 @@ led_tg(struct sk_buff *skb, const struct xt_action_param *par)
62 */ 65 */
63 if ((ledinfo->delay > 0) && ledinfo->always_blink && 66 if ((ledinfo->delay > 0) && ledinfo->always_blink &&
64 timer_pending(&ledinternal->timer)) 67 timer_pending(&ledinternal->timer))
65 led_trigger_event(&ledinternal->netfilter_led_trigger, LED_OFF); 68 led_trigger_blink_oneshot(&ledinternal->netfilter_led_trigger,
66 69 &led_delay, &led_delay, 1);
67 led_trigger_event(&ledinternal->netfilter_led_trigger, LED_FULL); 70 else
71 led_trigger_event(&ledinternal->netfilter_led_trigger, LED_FULL);
68 72
69 /* If there's a positive delay, start/update the timer */ 73 /* If there's a positive delay, start/update the timer */
70 if (ledinfo->delay > 0) { 74 if (ledinfo->delay > 0) {