Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57720
b: refs/heads/master
c: d570ee4
h: refs/heads/master
v: v3
  • Loading branch information
Vlad Yasevich authored and Vladislav Yasevich committed Jun 13, 2007
1 parent 0d5a731 commit 15cf955
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 14 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: 74235a25c673f80147c1f975304888e8212a14d5
refs/heads/master: d570ee490fb18220262cfe41284d7aede797ed4f
1 change: 0 additions & 1 deletion trunk/net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -2932,7 +2932,6 @@ void tcp_parse_options(struct sk_buff *skb, struct tcp_options_received *opt_rx,
opt_rx->sack_ok) {
TCP_SKB_CB(skb)->sacked = (ptr - 2) - (unsigned char *)th;
}
break;
#ifdef CONFIG_TCP_MD5SIG
case TCPOPT_MD5SIG:
/*
Expand Down
33 changes: 22 additions & 11 deletions trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2154,15 +2154,6 @@ static void addrconf_dev_config(struct net_device *dev)

ASSERT_RTNL();

if ((dev->type != ARPHRD_ETHER) &&
(dev->type != ARPHRD_FDDI) &&
(dev->type != ARPHRD_IEEE802_TR) &&
(dev->type != ARPHRD_ARCNET) &&
(dev->type != ARPHRD_INFINIBAND)) {
/* Alas, we support only Ethernet autoconfiguration. */
return;
}

idev = addrconf_add_dev(dev);
if (idev == NULL)
return;
Expand Down Expand Up @@ -2250,16 +2241,36 @@ static void addrconf_ip6_tnl_config(struct net_device *dev)
ip6_tnl_add_linklocal(idev);
}

static int ipv6_hwtype(struct net_device *dev)
{
if ((dev->type == ARPHRD_ETHER) ||
(dev->type == ARPHRD_LOOPBACK) ||
(dev->type == ARPHRD_SIT) ||
(dev->type == ARPHRD_TUNNEL6) ||
(dev->type == ARPHRD_FDDI) ||
(dev->type == ARPHRD_IEEE802_TR) ||
(dev->type == ARPHRD_ARCNET) ||
(dev->type == ARPHRD_INFINIBAND))
return 1;

return 0;
}

static int addrconf_notify(struct notifier_block *this, unsigned long event,
void * data)
{
struct net_device *dev = (struct net_device *) data;
struct inet6_dev *idev = __in6_dev_get(dev);
struct inet6_dev *idev;
int run_pending = 0;

if (!ipv6_hwtype(dev))
return NOTIFY_OK;

idev = __in6_dev_get(dev);

switch(event) {
case NETDEV_REGISTER:
if (!idev && dev->mtu >= IPV6_MIN_MTU) {
if (!idev) {
idev = ipv6_add_dev(dev);
if (!idev)
printk(KERN_WARNING "IPv6: add_dev failed for %s\n",
Expand Down
4 changes: 3 additions & 1 deletion trunk/net/sctp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -3550,6 +3550,7 @@ SCTP_STATIC int sctp_do_peeloff(struct sctp_association *asoc,
struct sock *sk = asoc->base.sk;
struct socket *sock;
struct inet_sock *inetsk;
struct sctp_af *af;
int err = 0;

/* An association cannot be branched off from an already peeled-off
Expand All @@ -3571,8 +3572,9 @@ SCTP_STATIC int sctp_do_peeloff(struct sctp_association *asoc,
/* Make peeled-off sockets more like 1-1 accepted sockets.
* Set the daddr and initialize id to something more random
*/
af = sctp_get_af_specific(asoc->peer.primary_addr.sa.sa_family);
af->to_sk_daddr(&asoc->peer.primary_addr, sk);
inetsk = inet_sk(sock->sk);
inetsk->daddr = asoc->peer.primary_addr.v4.sin_addr.s_addr;
inetsk->id = asoc->next_tsn ^ jiffies;

*sockp = sock;
Expand Down

0 comments on commit 15cf955

Please sign in to comment.