Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144771
b: refs/heads/master
c: be8be9e
h: refs/heads/master
i:
  144769: 5927b1a
  144767: 34d124d
v: v3
  • Loading branch information
Simon Horman authored and David S. Miller committed May 8, 2009
1 parent de19a96 commit b19e499
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e81963b180ac502fda0326edf059b1e29cdef1a2
refs/heads/master: be8be9eccbf2d908a7e56b3f7a71105cd88da06b
9 changes: 7 additions & 2 deletions trunk/net/netfilter/ipvs/ip_vs_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ struct ip_vs_conn *ip_vs_ct_in_get
list_for_each_entry(cp, &ip_vs_conn_tab[hash], c_list) {
if (cp->af == af &&
ip_vs_addr_equal(af, s_addr, &cp->caddr) &&
ip_vs_addr_equal(af, d_addr, &cp->vaddr) &&
/* protocol should only be IPPROTO_IP if
* d_addr is a fwmark */
ip_vs_addr_equal(protocol == IPPROTO_IP ? AF_UNSPEC : af,
d_addr, &cp->vaddr) &&
s_port == cp->cport && d_port == cp->vport &&
cp->flags & IP_VS_CONN_F_TEMPLATE &&
protocol == cp->protocol) {
Expand Down Expand Up @@ -698,7 +701,9 @@ ip_vs_conn_new(int af, int proto, const union nf_inet_addr *caddr, __be16 cport,
cp->cport = cport;
ip_vs_addr_copy(af, &cp->vaddr, vaddr);
cp->vport = vport;
ip_vs_addr_copy(af, &cp->daddr, daddr);
/* proto should only be IPPROTO_IP if d_addr is a fwmark */
ip_vs_addr_copy(proto == IPPROTO_IP ? AF_UNSPEC : af,
&cp->daddr, daddr);
cp->dport = dport;
cp->flags = flags;
spin_lock_init(&cp->lock);
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/netfilter/ipvs/ip_vs_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ ip_vs_sched_persist(struct ip_vs_service *svc,
*/
if (svc->fwmark) {
union nf_inet_addr fwmark = {
.all = { 0, 0, 0, htonl(svc->fwmark) }
.ip = htonl(svc->fwmark)
};

ct = ip_vs_ct_in_get(svc->af, IPPROTO_IP, &snet, 0,
Expand Down Expand Up @@ -306,7 +306,7 @@ ip_vs_sched_persist(struct ip_vs_service *svc,
*/
if (svc->fwmark) {
union nf_inet_addr fwmark = {
.all = { 0, 0, 0, htonl(svc->fwmark) }
.ip = htonl(svc->fwmark)
};

ct = ip_vs_conn_new(svc->af, IPPROTO_IP,
Expand Down

0 comments on commit b19e499

Please sign in to comment.