Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
92e52b2e
Commit
92e52b2e
authored
Aug 08, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
parents
03c6b749
ca933452
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
41 additions
and
44 deletions
+41
-44
drivers/net/tg3.c
drivers/net/tg3.c
+8
-8
include/linux/netlink.h
include/linux/netlink.h
+1
-3
net/ipv4/icmp.c
net/ipv4/icmp.c
+1
-2
net/ipv4/ip_fragment.c
net/ipv4/ip_fragment.c
+3
-5
net/ipv4/ip_sockglue.c
net/ipv4/ip_sockglue.c
+3
-0
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_ipv4.c
+6
-8
net/ipv4/udp.c
net/ipv4/udp.c
+16
-18
net/ipv6/ipv6_sockglue.c
net/ipv6/ipv6_sockglue.c
+3
-0
No files found.
drivers/net/tg3.c
View file @
92e52b2e
...
@@ -66,8 +66,8 @@
...
@@ -66,8 +66,8 @@
#define DRV_MODULE_NAME "tg3"
#define DRV_MODULE_NAME "tg3"
#define PFX DRV_MODULE_NAME ": "
#define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "3.3
4
"
#define DRV_MODULE_VERSION "3.3
5
"
#define DRV_MODULE_RELDATE "
July 25
, 2005"
#define DRV_MODULE_RELDATE "
August 6
, 2005"
#define TG3_DEF_MAC_MODE 0
#define TG3_DEF_MAC_MODE 0
#define TG3_DEF_RX_MODE 0
#define TG3_DEF_RX_MODE 0
...
@@ -10421,6 +10421,12 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
...
@@ -10421,6 +10421,12 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
tg3_init_coal
(
tp
);
tg3_init_coal
(
tp
);
/* Now that we have fully setup the chip, save away a snapshot
* of the PCI config space. We need to restore this after
* GRC_MISC_CFG core clock resets and some resume events.
*/
pci_save_state
(
tp
->
pdev
);
err
=
register_netdev
(
dev
);
err
=
register_netdev
(
dev
);
if
(
err
)
{
if
(
err
)
{
printk
(
KERN_ERR
PFX
"Cannot register net device, "
printk
(
KERN_ERR
PFX
"Cannot register net device, "
...
@@ -10430,12 +10436,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
...
@@ -10430,12 +10436,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
pci_set_drvdata
(
pdev
,
dev
);
pci_set_drvdata
(
pdev
,
dev
);
/* Now that we have fully setup the chip, save away a snapshot
* of the PCI config space. We need to restore this after
* GRC_MISC_CFG core clock resets and some resume events.
*/
pci_save_state
(
tp
->
pdev
);
printk
(
KERN_INFO
"%s: Tigon3 [partno(%s) rev %04x PHY(%s)] (PCI%s:%s:%s) %sBaseT Ethernet "
,
printk
(
KERN_INFO
"%s: Tigon3 [partno(%s) rev %04x PHY(%s)] (PCI%s:%s:%s) %sBaseT Ethernet "
,
dev
->
name
,
dev
->
name
,
tp
->
board_part_number
,
tp
->
board_part_number
,
...
...
include/linux/netlink.h
View file @
92e52b2e
...
@@ -12,15 +12,13 @@
...
@@ -12,15 +12,13 @@
#define NETLINK_NFLOG 5
/* netfilter/iptables ULOG */
#define NETLINK_NFLOG 5
/* netfilter/iptables ULOG */
#define NETLINK_XFRM 6
/* ipsec */
#define NETLINK_XFRM 6
/* ipsec */
#define NETLINK_SELINUX 7
/* SELinux event notifications */
#define NETLINK_SELINUX 7
/* SELinux event notifications */
#define NETLINK_
ARPD 8
#define NETLINK_
ISCSI 8
/* Open-iSCSI */
#define NETLINK_AUDIT 9
/* auditing */
#define NETLINK_AUDIT 9
/* auditing */
#define NETLINK_FIB_LOOKUP 10
#define NETLINK_FIB_LOOKUP 10
#define NETLINK_ROUTE6 11
/* af_inet6 route comm channel */
#define NETLINK_NETFILTER 12
/* netfilter subsystem */
#define NETLINK_NETFILTER 12
/* netfilter subsystem */
#define NETLINK_IP6_FW 13
#define NETLINK_IP6_FW 13
#define NETLINK_DNRTMSG 14
/* DECnet routing messages */
#define NETLINK_DNRTMSG 14
/* DECnet routing messages */
#define NETLINK_KOBJECT_UEVENT 15
/* Kernel messages to userspace */
#define NETLINK_KOBJECT_UEVENT 15
/* Kernel messages to userspace */
#define NETLINK_TAPBASE 16
/* 16 to 31 are ethertap */
#define MAX_LINKS 32
#define MAX_LINKS 32
...
...
net/ipv4/icmp.c
View file @
92e52b2e
...
@@ -936,8 +936,7 @@ int icmp_rcv(struct sk_buff *skb)
...
@@ -936,8 +936,7 @@ int icmp_rcv(struct sk_buff *skb)
case
CHECKSUM_HW
:
case
CHECKSUM_HW
:
if
(
!
(
u16
)
csum_fold
(
skb
->
csum
))
if
(
!
(
u16
)
csum_fold
(
skb
->
csum
))
break
;
break
;
NETDEBUG
(
if
(
net_ratelimit
())
LIMIT_NETDEBUG
(
printk
(
KERN_DEBUG
"icmp v4 hw csum failure
\n
"
));
printk
(
KERN_DEBUG
"icmp v4 hw csum failure
\n
"
));
case
CHECKSUM_NONE
:
case
CHECKSUM_NONE
:
if
((
u16
)
csum_fold
(
skb_checksum
(
skb
,
0
,
skb
->
len
,
0
)))
if
((
u16
)
csum_fold
(
skb_checksum
(
skb
,
0
,
skb
->
len
,
0
)))
goto
error
;
goto
error
;
...
...
net/ipv4/ip_fragment.c
View file @
92e52b2e
...
@@ -377,7 +377,7 @@ static struct ipq *ip_frag_create(unsigned hash, struct iphdr *iph, u32 user)
...
@@ -377,7 +377,7 @@ static struct ipq *ip_frag_create(unsigned hash, struct iphdr *iph, u32 user)
return
ip_frag_intern
(
hash
,
qp
);
return
ip_frag_intern
(
hash
,
qp
);
out_nomem:
out_nomem:
NETDEBUG
(
if
(
net_ratelimit
())
printk
(
KERN_ERR
"ip_frag_create: no memory left !
\n
"
));
LIMIT_NETDEBUG
(
printk
(
KERN_ERR
"ip_frag_create: no memory left !
\n
"
));
return
NULL
;
return
NULL
;
}
}
...
@@ -625,10 +625,8 @@ static struct sk_buff *ip_frag_reasm(struct ipq *qp, struct net_device *dev)
...
@@ -625,10 +625,8 @@ static struct sk_buff *ip_frag_reasm(struct ipq *qp, struct net_device *dev)
return
head
;
return
head
;
out_nomem:
out_nomem:
NETDEBUG
(
if
(
net_ratelimit
())
LIMIT_NETDEBUG
(
printk
(
KERN_ERR
"IP: queue_glue: no memory for gluing "
printk
(
KERN_ERR
"queue %p
\n
"
,
qp
));
"IP: queue_glue: no memory for gluing queue %p
\n
"
,
qp
));
goto
out_fail
;
goto
out_fail
;
out_oversize:
out_oversize:
if
(
net_ratelimit
())
if
(
net_ratelimit
())
...
...
net/ipv4/ip_sockglue.c
View file @
92e52b2e
...
@@ -848,6 +848,9 @@ int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval,
...
@@ -848,6 +848,9 @@ int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval,
case
IP_IPSEC_POLICY
:
case
IP_IPSEC_POLICY
:
case
IP_XFRM_POLICY
:
case
IP_XFRM_POLICY
:
err
=
-
EPERM
;
if
(
!
capable
(
CAP_NET_ADMIN
))
break
;
err
=
xfrm_user_policy
(
sk
,
optname
,
optval
,
optlen
);
err
=
xfrm_user_policy
(
sk
,
optname
,
optval
,
optlen
);
break
;
break
;
...
...
net/ipv4/tcp_ipv4.c
View file @
92e52b2e
...
@@ -1494,12 +1494,11 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
...
@@ -1494,12 +1494,11 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
* to destinations, already remembered
* to destinations, already remembered
* to the moment of synflood.
* to the moment of synflood.
*/
*/
NETDEBUG
(
if
(
net_ratelimit
())
\
LIMIT_NETDEBUG
(
printk
(
KERN_DEBUG
"TCP: drop open "
printk
(
KERN_DEBUG
"TCP: drop open "
"request from %u.%u."
"request from %u.%u."
"%u.%u/%u
\n
"
,
"%u.%u/%u
\n
"
,
\
NIPQUAD
(
saddr
),
NIPQUAD
(
saddr
),
ntohs
(
skb
->
h
.
th
->
source
)));
ntohs
(
skb
->
h
.
th
->
source
)));
dst_release
(
dst
);
dst_release
(
dst
);
goto
drop_and_free
;
goto
drop_and_free
;
}
}
...
@@ -1627,8 +1626,7 @@ static int tcp_v4_checksum_init(struct sk_buff *skb)
...
@@ -1627,8 +1626,7 @@ static int tcp_v4_checksum_init(struct sk_buff *skb)
skb
->
nh
.
iph
->
daddr
,
skb
->
csum
))
skb
->
nh
.
iph
->
daddr
,
skb
->
csum
))
return
0
;
return
0
;
NETDEBUG
(
if
(
net_ratelimit
())
LIMIT_NETDEBUG
(
printk
(
KERN_DEBUG
"hw tcp v4 csum failed
\n
"
));
printk
(
KERN_DEBUG
"hw tcp v4 csum failed
\n
"
));
skb
->
ip_summed
=
CHECKSUM_NONE
;
skb
->
ip_summed
=
CHECKSUM_NONE
;
}
}
if
(
skb
->
len
<=
76
)
{
if
(
skb
->
len
<=
76
)
{
...
...
net/ipv4/udp.c
View file @
92e52b2e
...
@@ -628,7 +628,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
...
@@ -628,7 +628,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
/* ... which is an evident application bug. --ANK */
/* ... which is an evident application bug. --ANK */
release_sock
(
sk
);
release_sock
(
sk
);
NETDEBUG
(
if
(
net_ratelimit
())
printk
(
KERN_DEBUG
"udp cork app bug 2
\n
"
));
LIMIT_NETDEBUG
(
printk
(
KERN_DEBUG
"udp cork app bug 2
\n
"
));
err
=
-
EINVAL
;
err
=
-
EINVAL
;
goto
out
;
goto
out
;
}
}
...
@@ -693,7 +693,7 @@ static int udp_sendpage(struct sock *sk, struct page *page, int offset,
...
@@ -693,7 +693,7 @@ static int udp_sendpage(struct sock *sk, struct page *page, int offset,
if
(
unlikely
(
!
up
->
pending
))
{
if
(
unlikely
(
!
up
->
pending
))
{
release_sock
(
sk
);
release_sock
(
sk
);
NETDEBUG
(
if
(
net_ratelimit
())
printk
(
KERN_DEBUG
"udp cork app bug 3
\n
"
));
LIMIT_NETDEBUG
(
printk
(
KERN_DEBUG
"udp cork app bug 3
\n
"
));
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
@@ -1102,7 +1102,7 @@ static int udp_checksum_init(struct sk_buff *skb, struct udphdr *uh,
...
@@ -1102,7 +1102,7 @@ static int udp_checksum_init(struct sk_buff *skb, struct udphdr *uh,
skb
->
ip_summed
=
CHECKSUM_UNNECESSARY
;
skb
->
ip_summed
=
CHECKSUM_UNNECESSARY
;
if
(
!
udp_check
(
uh
,
ulen
,
saddr
,
daddr
,
skb
->
csum
))
if
(
!
udp_check
(
uh
,
ulen
,
saddr
,
daddr
,
skb
->
csum
))
return
0
;
return
0
;
NETDEBUG
(
if
(
net_ratelimit
())
printk
(
KERN_DEBUG
"udp v4 hw csum failure.
\n
"
));
LIMIT_NETDEBUG
(
printk
(
KERN_DEBUG
"udp v4 hw csum failure.
\n
"
));
skb
->
ip_summed
=
CHECKSUM_NONE
;
skb
->
ip_summed
=
CHECKSUM_NONE
;
}
}
if
(
skb
->
ip_summed
!=
CHECKSUM_UNNECESSARY
)
if
(
skb
->
ip_summed
!=
CHECKSUM_UNNECESSARY
)
...
@@ -1181,14 +1181,13 @@ int udp_rcv(struct sk_buff *skb)
...
@@ -1181,14 +1181,13 @@ int udp_rcv(struct sk_buff *skb)
return
(
0
);
return
(
0
);
short_packet:
short_packet:
NETDEBUG
(
if
(
net_ratelimit
())
LIMIT_NETDEBUG
(
printk
(
KERN_DEBUG
"UDP: short packet: From %u.%u.%u.%u:%u %d/%d to %u.%u.%u.%u:%u
\n
"
,
printk
(
KERN_DEBUG
"UDP: short packet: From %u.%u.%u.%u:%u %d/%d to %u.%u.%u.%u:%u
\n
"
,
NIPQUAD
(
saddr
),
NIPQUAD
(
saddr
),
ntohs
(
uh
->
source
),
ntohs
(
uh
->
source
),
ulen
,
ulen
,
len
,
len
,
NIPQUAD
(
daddr
),
NIPQUAD
(
daddr
),
ntohs
(
uh
->
dest
)));
ntohs
(
uh
->
dest
)));
no_header:
no_header:
UDP_INC_STATS_BH
(
UDP_MIB_INERRORS
);
UDP_INC_STATS_BH
(
UDP_MIB_INERRORS
);
kfree_skb
(
skb
);
kfree_skb
(
skb
);
...
@@ -1199,13 +1198,12 @@ int udp_rcv(struct sk_buff *skb)
...
@@ -1199,13 +1198,12 @@ int udp_rcv(struct sk_buff *skb)
* RFC1122: OK. Discards the bad packet silently (as far as
* RFC1122: OK. Discards the bad packet silently (as far as
* the network is concerned, anyway) as per 4.1.3.4 (MUST).
* the network is concerned, anyway) as per 4.1.3.4 (MUST).
*/
*/
NETDEBUG
(
if
(
net_ratelimit
())
LIMIT_NETDEBUG
(
printk
(
KERN_DEBUG
"UDP: bad checksum. From %d.%d.%d.%d:%d to %d.%d.%d.%d:%d ulen %d
\n
"
,
printk
(
KERN_DEBUG
"UDP: bad checksum. From %d.%d.%d.%d:%d to %d.%d.%d.%d:%d ulen %d
\n
"
,
NIPQUAD
(
saddr
),
NIPQUAD
(
saddr
),
ntohs
(
uh
->
source
),
ntohs
(
uh
->
source
),
NIPQUAD
(
daddr
),
NIPQUAD
(
daddr
),
ntohs
(
uh
->
dest
),
ntohs
(
uh
->
dest
),
ulen
));
ulen
));
drop:
drop:
UDP_INC_STATS_BH
(
UDP_MIB_INERRORS
);
UDP_INC_STATS_BH
(
UDP_MIB_INERRORS
);
kfree_skb
(
skb
);
kfree_skb
(
skb
);
...
...
net/ipv6/ipv6_sockglue.c
View file @
92e52b2e
...
@@ -504,6 +504,9 @@ int ipv6_setsockopt(struct sock *sk, int level, int optname,
...
@@ -504,6 +504,9 @@ int ipv6_setsockopt(struct sock *sk, int level, int optname,
break
;
break
;
case
IPV6_IPSEC_POLICY
:
case
IPV6_IPSEC_POLICY
:
case
IPV6_XFRM_POLICY
:
case
IPV6_XFRM_POLICY
:
retv
=
-
EPERM
;
if
(
!
capable
(
CAP_NET_ADMIN
))
break
;
retv
=
xfrm_user_policy
(
sk
,
optname
,
optval
,
optlen
);
retv
=
xfrm_user_policy
(
sk
,
optname
,
optval
,
optlen
);
break
;
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment