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)
hme_write32(hp, bregs + BMAC_IGAP1, DEFAULT_IPG1);
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. */
HMD(("rseed/macaddr, "));
......@@ -2805,8 +2799,8 @@ static int __init happy_meal_sbus_init(struct sbus_dev *sdev, int is_qfe)
dev->watchdog_timeo = 5*HZ;
dev->do_ioctl = &happy_meal_ioctl;
/* Happy Meal can do it all... */
dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;
/* Happy Meal can do it all... except VLAN. */
dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_VLAN_CHALLENGED;
dev->irq = sdev->irqs[0];
......
......@@ -1060,17 +1060,19 @@ static void igmp_group_dropped(struct ip_mc_list *im)
reporter = im->reporter;
igmp_stop_timer(im);
if (IGMP_V1_SEEN(in_dev))
goto done;
if (IGMP_V2_SEEN(in_dev)) {
if (reporter)
igmp_send_report(in_dev, im, IGMP_HOST_LEAVE_MESSAGE);
goto done;
}
/* IGMPv3 */
igmpv3_add_delrec(in_dev, im);
if (in_dev->dev->flags & IFF_UP) {
if (IGMP_V1_SEEN(in_dev))
goto done;
if (IGMP_V2_SEEN(in_dev)) {
if (reporter)
igmp_send_report(in_dev, im, IGMP_HOST_LEAVE_MESSAGE);
goto done;
}
/* IGMPv3 */
igmpv3_add_delrec(in_dev, im);
igmp_ifc_event(in_dev);
igmp_ifc_event(in_dev);
}
done:
#endif
ip_mc_clear_src(im);
......
......@@ -383,7 +383,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
* IP_HDRINCL is much more convenient.
*/
} else {
err = -EINVAL;
err = -EDESTADDRREQ;
if (sk->sk_state != TCP_ESTABLISHED)
goto out;
daddr = inet->daddr;
......
......@@ -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_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. */
tp->af_specific->rebuild_header(sk);
......@@ -3714,13 +3721,6 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
else
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)) {
sk->sk_state_change(sk);
sk_wake_async(sk, 0, POLL_OUT);
......
......@@ -540,7 +540,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
return -EINVAL;
} else {
if (sk->sk_state != TCP_ESTABLISHED)
return -ENOTCONN;
return -EDESTADDRREQ;
daddr = inet->daddr;
dport = inet->dport;
/* 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
inet->cork.length = 0;
inet->sndmsg_page = NULL;
inet->sndmsg_off = 0;
if ((exthdrlen = rt->u.dst.header_len) != 0) {
length += exthdrlen;
transhdrlen += exthdrlen;
}
exthdrlen += opt ? opt->opt_flen : 0;
exthdrlen = rt->u.dst.header_len + (opt ? opt->opt_flen : 0);
length += exthdrlen;
transhdrlen += exthdrlen;
} else {
rt = np->cork.rt;
if (inet->cork.flags & IPCORK_OPT)
......
......@@ -602,7 +602,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg
fl.oif = sin6->sin6_scope_id;
} else {
if (sk->sk_state != TCP_ESTABLISHED)
return(-EINVAL);
return -EDESTADDRREQ;
proto = inet->num;
daddr = &np->daddr;
......
......@@ -862,7 +862,7 @@ static int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg
fl.oif = sin6->sin6_scope_id;
} else {
if (sk->sk_state != TCP_ESTABLISHED)
return -ENOTCONN;
return -EDESTADDRREQ;
up->dport = inet->dport;
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