Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315074
b: refs/heads/master
c: 3e12939
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jul 11, 2012
1 parent 827a149 commit 7baa9d1
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 19 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: 1d861aa4b3fb08822055345f480850205ffe6170
refs/heads/master: 3e12939a2a67fbb4cbd962c3b9bc398c73319766
5 changes: 2 additions & 3 deletions trunk/include/net/flow.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ struct flowi_common {
__u8 flowic_proto;
__u8 flowic_flags;
#define FLOWI_FLAG_ANYSRC 0x01
#define FLOWI_FLAG_PRECOW_METRICS 0x02
#define FLOWI_FLAG_CAN_SLEEP 0x04
#define FLOWI_FLAG_RT_NOCACHE 0x08
#define FLOWI_FLAG_CAN_SLEEP 0x02
#define FLOWI_FLAG_RT_NOCACHE 0x04
__u32 flowic_secid;
};

Expand Down
2 changes: 0 additions & 2 deletions trunk/include/net/inet_sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,6 @@ static inline __u8 inet_sk_flowi_flags(const struct sock *sk)

if (inet_sk(sk)->transparent || inet_sk(sk)->hdrincl)
flags |= FLOWI_FLAG_ANYSRC;
if (sk->sk_protocol == IPPROTO_TCP)
flags |= FLOWI_FLAG_PRECOW_METRICS;
return flags;
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/include/net/route.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@ static inline void ip_route_connect_init(struct flowi4 *fl4, __be32 dst, __be32

if (inet_sk(sk)->transparent)
flow_flags |= FLOWI_FLAG_ANYSRC;
if (protocol == IPPROTO_TCP)
flow_flags |= FLOWI_FLAG_PRECOW_METRICS;
if (can_sleep)
flow_flags |= FLOWI_FLAG_CAN_SLEEP;

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/inet_connection_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ struct dst_entry *inet_csk_route_req(struct sock *sk,
const struct inet_request_sock *ireq = inet_rsk(req);
struct ip_options_rcu *opt = inet_rsk(req)->opt;
struct net *net = sock_net(sk);
int flags = inet_sk_flowi_flags(sk) & ~FLOWI_FLAG_PRECOW_METRICS;
int flags = inet_sk_flowi_flags(sk);

if (nocache)
flags |= FLOWI_FLAG_RT_NOCACHE;
Expand Down
11 changes: 2 additions & 9 deletions trunk/net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,7 @@ void ipv4_update_pmtu(struct sk_buff *skb, struct net *net, u32 mtu,
struct rtable *rt;

flowi4_init_output(&fl4, oif, mark, RT_TOS(iph->tos), RT_SCOPE_UNIVERSE,
protocol, flow_flags | FLOWI_FLAG_PRECOW_METRICS,
protocol, flow_flags,
iph->daddr, iph->saddr, 0, 0);
rt = __ip_route_output_key(net, &fl4);
if (!IS_ERR(rt)) {
Expand Down Expand Up @@ -1836,18 +1836,11 @@ static void rt_init_metrics(struct rtable *rt, const struct flowi4 *fl4,
{
struct inet_peer_base *base;
struct inet_peer *peer;
int create = 0;

/* If a peer entry exists for this destination, we must hook
* it up in order to get at cached metrics.
*/
if (fl4 && (fl4->flowi4_flags & FLOWI_FLAG_PRECOW_METRICS))
create = 1;

base = inetpeer_base_ptr(rt->_peer);
BUG_ON(!base);

peer = inet_getpeer_v4(base, rt->rt_dst, create);
peer = inet_getpeer_v4(base, rt->rt_dst, 0);
if (peer) {
__rt_set_peer(rt, peer);
rt->rt_peer_genid = rt_peer_genid();
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ void ip6_update_pmtu(struct sk_buff *skb, struct net *net, __be32 mtu,
memset(&fl6, 0, sizeof(fl6));
fl6.flowi6_oif = oif;
fl6.flowi6_mark = mark;
fl6.flowi6_flags = FLOWI_FLAG_PRECOW_METRICS;
fl6.flowi6_flags = 0;
fl6.daddr = iph->daddr;
fl6.saddr = iph->saddr;
fl6.flowlabel = (*(__be32 *) iph) & IPV6_FLOWINFO_MASK;
Expand Down

0 comments on commit 7baa9d1

Please sign in to comment.