Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Torvalds committed Nov 4, 2005
2 parents 0f3278d + 52ab4ac commit 912cbe3
Show file tree
Hide file tree
Showing 8 changed files with 227 additions and 217 deletions.
6 changes: 3 additions & 3 deletions Documentation/DocBook/kernel-api.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ X!Ilib/string.c
<title>Network device support</title>
<sect1><title>Driver Support</title>
!Enet/core/dev.c
</sect1>
<sect1><title>8390 Based Network Cards</title>
!Edrivers/net/8390.c
!Enet/ethernet/eth.c
!Einclude/linux/etherdevice.h
!Enet/core/wireless.c
</sect1>
<sect1><title>Synchronous PPP</title>
!Edrivers/net/wan/syncppp.c
Expand Down
27 changes: 16 additions & 11 deletions include/linux/etherdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ static inline void eth_copy_and_sum (struct sk_buff *dest,
}

/**
* is_zero_ether_addr - Determine if give Ethernet address is all
* zeros.
* is_zero_ether_addr - Determine if give Ethernet address is all zeros.
* @addr: Pointer to a six-byte array containing the Ethernet address
*
* Return true if the address is all zeroes.
*/
static inline int is_zero_ether_addr(const u8 *addr)
{
return !(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]);
}

/**
* is_multicast_ether_addr - Determine if the given Ethernet address is a
* multicast address.
*
* is_multicast_ether_addr - Determine if the Ethernet address is a multicast.
* @addr: Pointer to a six-byte array containing the Ethernet address
*
* Return true if the address is a multicast address.
Expand All @@ -69,10 +69,15 @@ static inline int is_multicast_ether_addr(const u8 *addr)
return ((addr[0] != 0xff) && (0x01 & addr[0]));
}

/**
* is_broadcast_ether_addr - Determine if the Ethernet address is broadcast
* @addr: Pointer to a six-byte array containing the Ethernet address
*
* Return true if the address is the broadcast address.
*/
static inline int is_broadcast_ether_addr(const u8 *addr)
{
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) &&
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
return (addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == 0xff;
}

/**
Expand Down Expand Up @@ -108,14 +113,14 @@ static inline void random_ether_addr(u8 *addr)
/**
* compare_ether_addr - Compare two Ethernet addresses
* @addr1: Pointer to a six-byte array containing the Ethernet address
* @addr2 Pointer other six-byte array containing the Ethernet address
* @addr2: Pointer other six-byte array containing the Ethernet address
*
* Compare two ethernet addresses, returns 0 if equal
*/
static inline unsigned compare_ether_addr(const u8 *_a, const u8 *_b)
static inline unsigned compare_ether_addr(const u8 *addr1, const u8 *addr2)
{
const u16 *a = (const u16 *) _a;
const u16 *b = (const u16 *) _b;
const u16 *a = (const u16 *) addr1;
const u16 *b = (const u16 *) addr2;

BUILD_BUG_ON(ETH_ALEN != 6);
return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) != 0;
Expand Down
4 changes: 4 additions & 0 deletions net/core/datagram.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ int skb_copy_datagram_iovec(const struct sk_buff *skb, int offset,
{
int i, err, fraglen, end = 0;
struct sk_buff *next = skb_shinfo(skb)->frag_list;

if (!len)
return 0;

next_skb:
fraglen = skb_headlen(skb);
i = -1;
Expand Down
5 changes: 4 additions & 1 deletion net/ipv4/igmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1908,8 +1908,11 @@ int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex)
sock_kfree_s(sk, newpsl, IP_SFLSIZE(newpsl->sl_max));
goto done;
}
} else
} else {
newpsl = NULL;
(void) ip_mc_add_src(in_dev, &msf->imsf_multiaddr,
msf->imsf_fmode, 0, NULL, 0);
}
psl = pmc->sflist;
if (psl) {
(void) ip_mc_del_src(in_dev, &msf->imsf_multiaddr, pmc->sfmode,
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_bic.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/

static int fast_convergence = 1;
static int max_increment = 32;
static int max_increment = 16;
static int low_window = 14;
static int beta = 819; /* = 819/1024 (BICTCP_BETA_SCALE) */
static int low_utilization_threshold = 153;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2163,7 +2163,7 @@ static int addrconf_ifdown(struct net_device *dev, int how)

/* Step 5: netlink notification of this interface */
idev->tstamp = jiffies;
inet6_ifinfo_notify(RTM_NEWLINK, idev);
inet6_ifinfo_notify(RTM_DELLINK, idev);

/* Shot the device (if unregistered) */

Expand Down
4 changes: 3 additions & 1 deletion net/ipv6/mcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,8 +545,10 @@ int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf)
sock_kfree_s(sk, newpsl, IP6_SFLSIZE(newpsl->sl_max));
goto done;
}
} else
} else {
newpsl = NULL;
(void) ip6_mc_add_src(idev, group, gsf->gf_fmode, 0, NULL, 0);
}
psl = pmc->sflist;
if (psl) {
(void) ip6_mc_del_src(idev, group, pmc->sfmode,
Expand Down
Loading

0 comments on commit 912cbe3

Please sign in to comment.