Commit cdd3fde3 authored by David S. Miller's avatar David S. Miller

Merge davem@nuts.ninka.net:/home/davem/src/BK/net-2.5

into kernel.bkbits.net:/home/davem/net-2.5
parents 05081dcb fabe5553
...@@ -1521,12 +1521,6 @@ static int happy_meal_init(struct happy_meal *hp) ...@@ -1521,12 +1521,6 @@ static int happy_meal_init(struct happy_meal *hp)
hme_write32(hp, bregs + BMAC_IGAP1, DEFAULT_IPG1); hme_write32(hp, bregs + BMAC_IGAP1, DEFAULT_IPG1);
hme_write32(hp, bregs + BMAC_IGAP2, DEFAULT_IPG2); hme_write32(hp, bregs + BMAC_IGAP2, DEFAULT_IPG2);
/* Make sure we can handle VLAN frames. */
hme_write32(hp, bregs + BMAC_TXMAX,
ETH_DATA_LEN + ETH_HLEN + 8);
hme_write32(hp, bregs + BMAC_RXMAX,
ETH_DATA_LEN + ETH_HLEN + 8);
/* Load up the MAC address and random seed. */ /* Load up the MAC address and random seed. */
HMD(("rseed/macaddr, ")); HMD(("rseed/macaddr, "));
...@@ -2805,8 +2799,8 @@ static int __init happy_meal_sbus_init(struct sbus_dev *sdev, int is_qfe) ...@@ -2805,8 +2799,8 @@ static int __init happy_meal_sbus_init(struct sbus_dev *sdev, int is_qfe)
dev->watchdog_timeo = 5*HZ; dev->watchdog_timeo = 5*HZ;
dev->do_ioctl = &happy_meal_ioctl; dev->do_ioctl = &happy_meal_ioctl;
/* Happy Meal can do it all... */ /* Happy Meal can do it all... except VLAN. */
dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_VLAN_CHALLENGED;
dev->irq = sdev->irqs[0]; dev->irq = sdev->irqs[0];
......
...@@ -1060,17 +1060,19 @@ static void igmp_group_dropped(struct ip_mc_list *im) ...@@ -1060,17 +1060,19 @@ static void igmp_group_dropped(struct ip_mc_list *im)
reporter = im->reporter; reporter = im->reporter;
igmp_stop_timer(im); igmp_stop_timer(im);
if (IGMP_V1_SEEN(in_dev)) if (in_dev->dev->flags & IFF_UP) {
goto done; if (IGMP_V1_SEEN(in_dev))
if (IGMP_V2_SEEN(in_dev)) { goto done;
if (reporter) if (IGMP_V2_SEEN(in_dev)) {
igmp_send_report(in_dev, im, IGMP_HOST_LEAVE_MESSAGE); if (reporter)
goto done; igmp_send_report(in_dev, im, IGMP_HOST_LEAVE_MESSAGE);
} goto done;
/* IGMPv3 */ }
igmpv3_add_delrec(in_dev, im); /* IGMPv3 */
igmpv3_add_delrec(in_dev, im);
igmp_ifc_event(in_dev); igmp_ifc_event(in_dev);
}
done: done:
#endif #endif
ip_mc_clear_src(im); ip_mc_clear_src(im);
......
...@@ -383,7 +383,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, ...@@ -383,7 +383,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
* IP_HDRINCL is much more convenient. * IP_HDRINCL is much more convenient.
*/ */
} else { } else {
err = -EINVAL; err = -EDESTADDRREQ;
if (sk->sk_state != TCP_ESTABLISHED) if (sk->sk_state != TCP_ESTABLISHED)
goto out; goto out;
daddr = inet->daddr; daddr = inet->daddr;
......
...@@ -3694,6 +3694,13 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb, ...@@ -3694,6 +3694,13 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
tcp_sync_mss(sk, tp->pmtu_cookie); tcp_sync_mss(sk, tp->pmtu_cookie);
tcp_initialize_rcv_mss(sk); tcp_initialize_rcv_mss(sk);
/* Remember, tcp_poll() does not lock socket!
* Change state from SYN-SENT only after copied_seq
* is initialized. */
tp->copied_seq = tp->rcv_nxt;
mb();
tcp_set_state(sk, TCP_ESTABLISHED);
/* Make sure socket is routed, for correct metrics. */ /* Make sure socket is routed, for correct metrics. */
tp->af_specific->rebuild_header(sk); tp->af_specific->rebuild_header(sk);
...@@ -3714,13 +3721,6 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb, ...@@ -3714,13 +3721,6 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
else else
tp->pred_flags = 0; tp->pred_flags = 0;
/* Remember, tcp_poll() does not lock socket!
* Change state from SYN-SENT only after copied_seq
* is initialized. */
tp->copied_seq = tp->rcv_nxt;
mb();
tcp_set_state(sk, TCP_ESTABLISHED);
if (!sock_flag(sk, SOCK_DEAD)) { if (!sock_flag(sk, SOCK_DEAD)) {
sk->sk_state_change(sk); sk->sk_state_change(sk);
sk_wake_async(sk, 0, POLL_OUT); sk_wake_async(sk, 0, POLL_OUT);
......
...@@ -540,7 +540,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, ...@@ -540,7 +540,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
return -EINVAL; return -EINVAL;
} else { } else {
if (sk->sk_state != TCP_ESTABLISHED) if (sk->sk_state != TCP_ESTABLISHED)
return -ENOTCONN; return -EDESTADDRREQ;
daddr = inet->daddr; daddr = inet->daddr;
dport = inet->dport; dport = inet->dport;
/* Open fast path for connected socket. /* Open fast path for connected socket.
......
...@@ -1247,11 +1247,9 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offse ...@@ -1247,11 +1247,9 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offse
inet->cork.length = 0; inet->cork.length = 0;
inet->sndmsg_page = NULL; inet->sndmsg_page = NULL;
inet->sndmsg_off = 0; inet->sndmsg_off = 0;
if ((exthdrlen = rt->u.dst.header_len) != 0) { exthdrlen = rt->u.dst.header_len + (opt ? opt->opt_flen : 0);
length += exthdrlen; length += exthdrlen;
transhdrlen += exthdrlen; transhdrlen += exthdrlen;
}
exthdrlen += opt ? opt->opt_flen : 0;
} else { } else {
rt = np->cork.rt; rt = np->cork.rt;
if (inet->cork.flags & IPCORK_OPT) if (inet->cork.flags & IPCORK_OPT)
......
...@@ -602,7 +602,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg ...@@ -602,7 +602,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg
fl.oif = sin6->sin6_scope_id; fl.oif = sin6->sin6_scope_id;
} else { } else {
if (sk->sk_state != TCP_ESTABLISHED) if (sk->sk_state != TCP_ESTABLISHED)
return(-EINVAL); return -EDESTADDRREQ;
proto = inet->num; proto = inet->num;
daddr = &np->daddr; daddr = &np->daddr;
......
...@@ -862,7 +862,7 @@ static int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg ...@@ -862,7 +862,7 @@ static int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg
fl.oif = sin6->sin6_scope_id; fl.oif = sin6->sin6_scope_id;
} else { } else {
if (sk->sk_state != TCP_ESTABLISHED) if (sk->sk_state != TCP_ESTABLISHED)
return -ENOTCONN; return -EDESTADDRREQ;
up->dport = inet->dport; up->dport = inet->dport;
daddr = &np->daddr; daddr = &np->daddr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment