Skip to content

Commit 733bbb7

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: netfilter: ctnetlink: fix timeout calculation ipvs: try also real server with port 0 in backup server skge: restore rx multicast filter on resume and after config changes mlx4_en: nullify cq->vector field when closing completion queue
2 parents c7f46b7 + c121638 commit 733bbb7

File tree

7 files changed

+17
-7
lines changed

7 files changed

+17
-7
lines changed

drivers/net/ethernet/marvell/skge.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2606,6 +2606,9 @@ static int skge_up(struct net_device *dev)
26062606
spin_unlock_irq(&hw->hw_lock);
26072607

26082608
napi_enable(&skge->napi);
2609+
2610+
skge_set_multicast(dev);
2611+
26092612
return 0;
26102613

26112614
free_tx_ring:

drivers/net/ethernet/mellanox/mlx4/en_cq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ void mlx4_en_destroy_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq)
147147
mlx4_free_hwq_res(mdev->dev, &cq->wqres, cq->buf_size);
148148
if (priv->mdev->dev->caps.comp_pool && cq->vector)
149149
mlx4_release_eq(priv->mdev->dev, cq->vector);
150+
cq->vector = 0;
150151
cq->buf_size = 0;
151152
cq->buf = NULL;
152153
}

include/net/ip_vs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,7 @@ extern void ip_vs_control_cleanup(void);
12071207
extern struct ip_vs_dest *
12081208
ip_vs_find_dest(struct net *net, int af, const union nf_inet_addr *daddr,
12091209
__be16 dport, const union nf_inet_addr *vaddr, __be16 vport,
1210-
__u16 protocol, __u32 fwmark);
1210+
__u16 protocol, __u32 fwmark, __u32 flags);
12111211
extern struct ip_vs_dest *ip_vs_try_bind_dest(struct ip_vs_conn *cp);
12121212

12131213

net/netfilter/ipvs/ip_vs_conn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ struct ip_vs_dest *ip_vs_try_bind_dest(struct ip_vs_conn *cp)
616616
if ((cp) && (!cp->dest)) {
617617
dest = ip_vs_find_dest(ip_vs_conn_net(cp), cp->af, &cp->daddr,
618618
cp->dport, &cp->vaddr, cp->vport,
619-
cp->protocol, cp->fwmark);
619+
cp->protocol, cp->fwmark, cp->flags);
620620
ip_vs_bind_dest(cp, dest);
621621
return dest;
622622
} else

net/netfilter/ipvs/ip_vs_ctl.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,15 +619,21 @@ struct ip_vs_dest *ip_vs_find_dest(struct net *net, int af,
619619
const union nf_inet_addr *daddr,
620620
__be16 dport,
621621
const union nf_inet_addr *vaddr,
622-
__be16 vport, __u16 protocol, __u32 fwmark)
622+
__be16 vport, __u16 protocol, __u32 fwmark,
623+
__u32 flags)
623624
{
624625
struct ip_vs_dest *dest;
625626
struct ip_vs_service *svc;
627+
__be16 port = dport;
626628

627629
svc = ip_vs_service_get(net, af, fwmark, protocol, vaddr, vport);
628630
if (!svc)
629631
return NULL;
630-
dest = ip_vs_lookup_dest(svc, daddr, dport);
632+
if (fwmark && (flags & IP_VS_CONN_F_FWD_MASK) != IP_VS_CONN_F_MASQ)
633+
port = 0;
634+
dest = ip_vs_lookup_dest(svc, daddr, port);
635+
if (!dest)
636+
dest = ip_vs_lookup_dest(svc, daddr, port ^ dport);
631637
if (dest)
632638
atomic_inc(&dest->refcnt);
633639
ip_vs_service_put(svc);

net/netfilter/ipvs/ip_vs_sync.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ static void ip_vs_proc_conn(struct net *net, struct ip_vs_conn_param *param,
740740
* but still handled.
741741
*/
742742
dest = ip_vs_find_dest(net, type, daddr, dport, param->vaddr,
743-
param->vport, protocol, fwmark);
743+
param->vport, protocol, fwmark, flags);
744744

745745
/* Set the approprite ativity flag */
746746
if (protocol == IPPROTO_TCP) {

net/netfilter/nf_conntrack_netlink.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ ctnetlink_dump_status(struct sk_buff *skb, const struct nf_conn *ct)
135135
static inline int
136136
ctnetlink_dump_timeout(struct sk_buff *skb, const struct nf_conn *ct)
137137
{
138-
long timeout = (ct->timeout.expires - jiffies) / HZ;
138+
long timeout = ((long)ct->timeout.expires - (long)jiffies) / HZ;
139139

140140
if (timeout < 0)
141141
timeout = 0;
@@ -1641,7 +1641,7 @@ ctnetlink_exp_dump_expect(struct sk_buff *skb,
16411641
const struct nf_conntrack_expect *exp)
16421642
{
16431643
struct nf_conn *master = exp->master;
1644-
long timeout = (exp->timeout.expires - jiffies) / HZ;
1644+
long timeout = ((long)exp->timeout.expires - (long)jiffies) / HZ;
16451645
struct nf_conn_help *help;
16461646

16471647
if (timeout < 0)

0 commit comments

Comments
 (0)