git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TCPCT part 1f: Initiator Cookie => Responder
[safe/jmp/linux-2.6]
/
net
/
ipv4
/
arp.c
diff --git
a/net/ipv4/arp.c
b/net/ipv4/arp.c
index
8a3881e
..
4e80f33
100644
(file)
--- a/
net/ipv4/arp.c
+++ b/
net/ipv4/arp.c
@@
-130,7
+130,7
@@
static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb);
static void arp_error_report(struct neighbour *neigh, struct sk_buff *skb);
static void parp_redo(struct sk_buff *skb);
static void arp_error_report(struct neighbour *neigh, struct sk_buff *skb);
static void parp_redo(struct sk_buff *skb);
-static struct neigh_ops arp_generic_ops = {
+static
const
struct neigh_ops arp_generic_ops = {
.family = AF_INET,
.solicit = arp_solicit,
.error_report = arp_error_report,
.family = AF_INET,
.solicit = arp_solicit,
.error_report = arp_error_report,
@@
-140,7
+140,7
@@
static struct neigh_ops arp_generic_ops = {
.queue_xmit = dev_queue_xmit,
};
.queue_xmit = dev_queue_xmit,
};
-static struct neigh_ops arp_hh_ops = {
+static
const
struct neigh_ops arp_hh_ops = {
.family = AF_INET,
.solicit = arp_solicit,
.error_report = arp_error_report,
.family = AF_INET,
.solicit = arp_solicit,
.error_report = arp_error_report,
@@
-150,7
+150,7
@@
static struct neigh_ops arp_hh_ops = {
.queue_xmit = dev_queue_xmit,
};
.queue_xmit = dev_queue_xmit,
};
-static struct neigh_ops arp_direct_ops = {
+static
const
struct neigh_ops arp_direct_ops = {
.family = AF_INET,
.output = dev_queue_xmit,
.connected_output = dev_queue_xmit,
.family = AF_INET,
.output = dev_queue_xmit,
.connected_output = dev_queue_xmit,
@@
-158,7
+158,7
@@
static struct neigh_ops arp_direct_ops = {
.queue_xmit = dev_queue_xmit,
};
.queue_xmit = dev_queue_xmit,
};
-struct neigh_ops arp_broken_ops = {
+
const
struct neigh_ops arp_broken_ops = {
.family = AF_INET,
.solicit = arp_solicit,
.error_report = arp_error_report,
.family = AF_INET,
.solicit = arp_solicit,
.error_report = arp_error_report,
@@
-801,11
+801,8
@@
static int arp_process(struct sk_buff *skb)
* cache.
*/
* cache.
*/
- /*
- * Special case: IPv4 duplicate address detection packet (RFC2131)
- * and Gratuitous ARP/ARP Announce. (RFC3927, Section 2.4)
- */
- if (sip == 0 || tip == sip) {
+ /* Special case: IPv4 duplicate address detection packet (RFC2131) */
+ if (sip == 0) {
if (arp->ar_op == htons(ARPOP_REQUEST) &&
inet_addr_type(net, tip) == RTN_LOCAL &&
!arp_ignore(in_dev, sip, tip))
if (arp->ar_op == htons(ARPOP_REQUEST) &&
inet_addr_type(net, tip) == RTN_LOCAL &&
!arp_ignore(in_dev, sip, tip))
@@
-1307,7
+1304,9
@@
static void arp_format_neigh_entry(struct seq_file *seq,
hbuffer[k++] = hex_asc_lo(n->ha[j]);
hbuffer[k++] = ':';
}
hbuffer[k++] = hex_asc_lo(n->ha[j]);
hbuffer[k++] = ':';
}
- hbuffer[--k] = 0;
+ if (k != 0)
+ --k;
+ hbuffer[k] = 0;
#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
}
#endif
#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
}
#endif