Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96199
b: refs/heads/master
c: 822973b
h: refs/heads/master
i:
  96197: cedf861
  96195: ba97079
  96191: 95ef6ed
v: v3
  • Loading branch information
Pavel Emelyanov authored and Jeff Garzik committed May 6, 2008
1 parent 6bfa714 commit e2b64fe
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 35 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: aca51397d01474f80cab8fc978559b45f2e453ad
refs/heads/master: 822973ba79fd5a5b711270c2de7196c6b50c6687
4 changes: 3 additions & 1 deletion trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4936,7 +4936,9 @@ int bond_create(char *name, struct bond_params *params, struct bonding **newbond
if (res < 0) {
rtnl_lock();
down_write(&bonding_rwsem);
goto out_bond;
bond_deinit(bond_dev);
unregister_netdevice(bond_dev);
goto out_rtnl;
}

return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/macvlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ static void macvlan_dellink(struct net_device *dev)
unregister_netdevice(dev);

if (list_empty(&port->vlans))
macvlan_port_destroy(port->dev);
macvlan_port_destroy(dev);
}

static struct rtnl_link_ops macvlan_link_ops __read_mostly = {
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/netfilter/nf_conntrack_sip.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

struct nf_ct_sip_master {
unsigned int register_cseq;
unsigned int invite_cseq;
};

enum sip_expectation_classes {
Expand Down
8 changes: 3 additions & 5 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -4480,19 +4480,17 @@ static void __net_exit default_device_exit(struct net *net)
rtnl_lock();
for_each_netdev_safe(net, dev, next) {
int err;
char fb_name[IFNAMSIZ];

/* Ignore unmoveable devices (i.e. loopback) */
if (dev->features & NETIF_F_NETNS_LOCAL)
continue;

/* Push remaing network devices to init_net */
snprintf(fb_name, IFNAMSIZ, "dev%d", dev->ifindex);
err = dev_change_net_namespace(dev, &init_net, fb_name);
err = dev_change_net_namespace(dev, &init_net, "dev%d");
if (err) {
printk(KERN_EMERG "%s: failed to move %s to init_net: %d\n",
printk(KERN_WARNING "%s: failed to move %s to init_net: %d\n",
__func__, dev->name, err);
BUG();
unregister_netdevice(dev);
}
}
rtnl_unlock();
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/ip_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt,
iph = ip_hdr(skb);

/*
* RFC1122: 3.2.1.2 MUST silently discard any IP frame that fails the checksum.
* RFC1122: 3.1.2.2 MUST silently discard any IP frame that fails the checksum.
*
* Is the datagram acceptable?
*
Expand Down
13 changes: 5 additions & 8 deletions trunk/net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ int sysctl_tcp_abc __read_mostly;
#define FLAG_FORWARD_PROGRESS (FLAG_ACKED|FLAG_DATA_SACKED)
#define FLAG_ANY_PROGRESS (FLAG_FORWARD_PROGRESS|FLAG_SND_UNA_ADVANCED)

#define IsSackFrto() (sysctl_tcp_frto == 0x2)

#define TCP_REMNANT (TCP_FLAG_FIN|TCP_FLAG_URG|TCP_FLAG_SYN|TCP_FLAG_PSH)
#define TCP_HP_BITS (~(TCP_RESERVED_BITS|TCP_FLAG_PSH))

Expand Down Expand Up @@ -1684,11 +1686,6 @@ static inline void tcp_reset_reno_sack(struct tcp_sock *tp)
tp->sacked_out = 0;
}

static int tcp_is_sackfrto(const struct tcp_sock *tp)
{
return (sysctl_tcp_frto == 0x2) && !tcp_is_reno(tp);
}

/* F-RTO can only be used if TCP has never retransmitted anything other than
* head (SACK enhanced variant from Appendix B of RFC4138 is more robust here)
*/
Expand All @@ -1705,7 +1702,7 @@ int tcp_use_frto(struct sock *sk)
if (icsk->icsk_mtup.probe_size)
return 0;

if (tcp_is_sackfrto(tp))
if (IsSackFrto())
return 1;

/* Avoid expensive walking of rexmit queue if possible */
Expand Down Expand Up @@ -1795,7 +1792,7 @@ void tcp_enter_frto(struct sock *sk)
/* Earlier loss recovery underway (see RFC4138; Appendix B).
* The last condition is necessary at least in tp->frto_counter case.
*/
if (tcp_is_sackfrto(tp) && (tp->frto_counter ||
if (IsSackFrto() && (tp->frto_counter ||
((1 << icsk->icsk_ca_state) & (TCPF_CA_Recovery|TCPF_CA_Loss))) &&
after(tp->high_seq, tp->snd_una)) {
tp->frto_highmark = tp->high_seq;
Expand Down Expand Up @@ -3127,7 +3124,7 @@ static int tcp_process_frto(struct sock *sk, int flag)
return 1;
}

if (!tcp_is_sackfrto(tp)) {
if (!IsSackFrto() || tcp_is_reno(tp)) {
/* RFC4138 shortcoming in step 2; should also have case c):
* ACK isn't duplicate nor advances window, e.g., opposite dir
* data, winupdate
Expand Down
4 changes: 0 additions & 4 deletions trunk/net/netfilter/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ config NF_CT_PROTO_DCCP
tristate 'DCCP protocol connection tracking support (EXPERIMENTAL)'
depends on EXPERIMENTAL && NF_CONNTRACK
depends on NETFILTER_ADVANCED
default IP_DCCP
help
With this option enabled, the layer 3 independent connection
tracking code will be able to do state tracking on DCCP connections.
Expand All @@ -105,7 +104,6 @@ config NF_CT_PROTO_SCTP
tristate 'SCTP protocol connection tracking support (EXPERIMENTAL)'
depends on EXPERIMENTAL && NF_CONNTRACK
depends on NETFILTER_ADVANCED
default IP_SCTP
help
With this option enabled, the layer 3 independent connection
tracking code will be able to do state tracking on SCTP connections.
Expand Down Expand Up @@ -534,7 +532,6 @@ config NETFILTER_XT_MATCH_DCCP
tristate '"dccp" protocol match support'
depends on NETFILTER_XTABLES
depends on NETFILTER_ADVANCED
default IP_DCCP
help
With this option enabled, you will be able to use the iptables
`dccp' match in order to match on DCCP source/destination ports
Expand Down Expand Up @@ -728,7 +725,6 @@ config NETFILTER_XT_MATCH_SCTP
tristate '"sctp" protocol match support (EXPERIMENTAL)'
depends on NETFILTER_XTABLES && EXPERIMENTAL
depends on NETFILTER_ADVANCED
default IP_SCTP
help
With this option enabled, you will be able to use the
`sctp' match in order to match on SCTP source/destination ports
Expand Down
22 changes: 9 additions & 13 deletions trunk/net/netfilter/nf_conntrack_sip.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,6 @@ static int process_sdp(struct sk_buff *skb,
{
enum ip_conntrack_info ctinfo;
struct nf_conn *ct = nf_ct_get(skb, &ctinfo);
struct nf_conn_help *help = nfct_help(ct);
unsigned int matchoff, matchlen;
unsigned int mediaoff, medialen;
unsigned int sdpoff;
Expand Down Expand Up @@ -960,9 +959,6 @@ static int process_sdp(struct sk_buff *skb,
if (nf_nat_sdp_session && ct->status & IPS_NAT_MASK)
ret = nf_nat_sdp_session(skb, dptr, sdpoff, datalen, &rtp_addr);

if (ret == NF_ACCEPT && i > 0)
help->help.ct_sip_info.invite_cseq = cseq;

return ret;
}
static int process_invite_response(struct sk_buff *skb,
Expand All @@ -971,14 +967,14 @@ static int process_invite_response(struct sk_buff *skb,
{
enum ip_conntrack_info ctinfo;
struct nf_conn *ct = nf_ct_get(skb, &ctinfo);
struct nf_conn_help *help = nfct_help(ct);

if ((code >= 100 && code <= 199) ||
(code >= 200 && code <= 299))
return process_sdp(skb, dptr, datalen, cseq);
else if (help->help.ct_sip_info.invite_cseq == cseq)
else {
flush_expectations(ct, true);
return NF_ACCEPT;
return NF_ACCEPT;
}
}

static int process_update_response(struct sk_buff *skb,
Expand All @@ -987,14 +983,14 @@ static int process_update_response(struct sk_buff *skb,
{
enum ip_conntrack_info ctinfo;
struct nf_conn *ct = nf_ct_get(skb, &ctinfo);
struct nf_conn_help *help = nfct_help(ct);

if ((code >= 100 && code <= 199) ||
(code >= 200 && code <= 299))
return process_sdp(skb, dptr, datalen, cseq);
else if (help->help.ct_sip_info.invite_cseq == cseq)
else {
flush_expectations(ct, true);
return NF_ACCEPT;
return NF_ACCEPT;
}
}

static int process_prack_response(struct sk_buff *skb,
Expand All @@ -1003,14 +999,14 @@ static int process_prack_response(struct sk_buff *skb,
{
enum ip_conntrack_info ctinfo;
struct nf_conn *ct = nf_ct_get(skb, &ctinfo);
struct nf_conn_help *help = nfct_help(ct);

if ((code >= 100 && code <= 199) ||
(code >= 200 && code <= 299))
return process_sdp(skb, dptr, datalen, cseq);
else if (help->help.ct_sip_info.invite_cseq == cseq)
else {
flush_expectations(ct, true);
return NF_ACCEPT;
return NF_ACCEPT;
}
}

static int process_bye_request(struct sk_buff *skb,
Expand Down

0 comments on commit e2b64fe

Please sign in to comment.