summaryrefslogtreecommitdiff
path: root/pfinet/linux-src/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'pfinet/linux-src/net/ipv4')
-rw-r--r--pfinet/linux-src/net/ipv4/fib_semantics.c2
-rw-r--r--pfinet/linux-src/net/ipv4/icmp.c2
-rw-r--r--pfinet/linux-src/net/ipv4/ip_fw.c2
-rw-r--r--pfinet/linux-src/net/ipv4/ip_gre.c2
-rw-r--r--pfinet/linux-src/net/ipv4/ip_masq_quake.c4
-rw-r--r--pfinet/linux-src/net/ipv4/ip_options.c9
-rw-r--r--pfinet/linux-src/net/ipv4/ip_output.c2
-rw-r--r--pfinet/linux-src/net/ipv4/ipconfig.c2
-rw-r--r--pfinet/linux-src/net/ipv4/ipip.c2
-rw-r--r--pfinet/linux-src/net/ipv4/raw.c2
-rw-r--r--pfinet/linux-src/net/ipv4/tcp.c2
-rw-r--r--pfinet/linux-src/net/ipv4/tcp_input.c8
-rw-r--r--pfinet/linux-src/net/ipv4/tcp_ipv4.c2
-rw-r--r--pfinet/linux-src/net/ipv4/tcp_output.c2
14 files changed, 23 insertions, 20 deletions
diff --git a/pfinet/linux-src/net/ipv4/fib_semantics.c b/pfinet/linux-src/net/ipv4/fib_semantics.c
index b78f7eba..b7edb29b 100644
--- a/pfinet/linux-src/net/ipv4/fib_semantics.c
+++ b/pfinet/linux-src/net/ipv4/fib_semantics.c
@@ -291,7 +291,7 @@ int fib_nh_match(struct rtmsg *r, struct nlmsghdr *nlh, struct kern_rta *rta,
Attempt to reconcile all of these (alas, self-contradictory) conditions
results in pretty ugly and hairy code with obscure logic.
- I choosed to generalized it instead, so that the size
+ I chose to generalize it instead, so that the size
of code does not increase practically, but it becomes
much more general.
Every prefix is assigned a "scope" value: "host" is local address,
diff --git a/pfinet/linux-src/net/ipv4/icmp.c b/pfinet/linux-src/net/ipv4/icmp.c
index 6c1edfd7..7fad4783 100644
--- a/pfinet/linux-src/net/ipv4/icmp.c
+++ b/pfinet/linux-src/net/ipv4/icmp.c
@@ -730,7 +730,7 @@ static void icmp_unreach(struct icmphdr *icmph, struct sk_buff *skb, int len)
*/
/*
- * Check the other end isnt violating RFC 1122. Some routers send
+ * Check the other end isn't violating RFC 1122. Some routers send
* bogus responses to broadcast frames. If you see this message
* first check your netmask matches at both ends, if it does then
* get the other vendor to fix their kit.
diff --git a/pfinet/linux-src/net/ipv4/ip_fw.c b/pfinet/linux-src/net/ipv4/ip_fw.c
index 400f46c0..73af70ae 100644
--- a/pfinet/linux-src/net/ipv4/ip_fw.c
+++ b/pfinet/linux-src/net/ipv4/ip_fw.c
@@ -239,7 +239,7 @@ struct ip_chain
ip_chainlabel label; /* Defines the label for each block */
struct ip_chain *next; /* Pointer to next block */
struct ip_fwkernel *chain; /* Pointer to first rule in block */
- __u32 refcount; /* Number of refernces to block */
+ __u32 refcount; /* Number of references to block */
int policy; /* Default rule for chain. Only *
* used in built in chains */
struct ip_reent reent[0]; /* Actually several of these */
diff --git a/pfinet/linux-src/net/ipv4/ip_gre.c b/pfinet/linux-src/net/ipv4/ip_gre.c
index 6a7546fd..4b03c226 100644
--- a/pfinet/linux-src/net/ipv4/ip_gre.c
+++ b/pfinet/linux-src/net/ipv4/ip_gre.c
@@ -436,7 +436,7 @@ void ipgre_err(struct sk_buff *skb, unsigned char *dp, int len)
/* Impossible event. */
return;
case ICMP_FRAG_NEEDED:
- /* And it is the only really necesary thing :-) */
+ /* And it is the only really necessary thing :-) */
rel_info = ntohs(skb->h.icmph->un.frag.mtu);
if (rel_info < grehlen+68)
return;
diff --git a/pfinet/linux-src/net/ipv4/ip_masq_quake.c b/pfinet/linux-src/net/ipv4/ip_masq_quake.c
index 995c3a0a..646348d1 100644
--- a/pfinet/linux-src/net/ipv4/ip_masq_quake.c
+++ b/pfinet/linux-src/net/ipv4/ip_masq_quake.c
@@ -92,7 +92,7 @@ masq_quake_in (struct ip_masq_app *mapp, struct ip_masq *ms, struct sk_buff **sk
iph = skb->nh.iph;
uh = (struct udphdr *)&(((char *)iph)[iph->ihl*4]);
- /* Check for lenght */
+ /* Check for length */
if(ntohs(uh->len) < 5)
return 0;
@@ -178,7 +178,7 @@ masq_quake_out (struct ip_masq_app *mapp, struct ip_masq *ms, struct sk_buff **s
iph = skb->nh.iph;
uh = (struct udphdr *)&(((char *)iph)[iph->ihl*4]);
- /* Check for lenght */
+ /* Check for length */
if(ntohs(uh->len) < 5)
return 0;
diff --git a/pfinet/linux-src/net/ipv4/ip_options.c b/pfinet/linux-src/net/ipv4/ip_options.c
index a3d1f0aa..ec21054d 100644
--- a/pfinet/linux-src/net/ipv4/ip_options.c
+++ b/pfinet/linux-src/net/ipv4/ip_options.c
@@ -491,15 +491,18 @@ void ip_options_undo(struct ip_options * opt)
int ip_options_get(struct ip_options **optp, unsigned char *data, int optlen, int user)
{
struct ip_options *opt;
+ size_t opt_size = sizeof(struct ip_options)+((optlen+3)&~3);
- opt = kmalloc(sizeof(struct ip_options)+((optlen+3)&~3), GFP_KERNEL);
+ opt = kmalloc(opt_size, GFP_KERNEL);
if (!opt)
return -ENOMEM;
memset(opt, 0, sizeof(struct ip_options));
if (optlen) {
if (user) {
- if (copy_from_user(opt->__data, data, optlen))
+ if (copy_from_user(opt->__data, data, optlen)) {
+ kfree_s(opt, opt_size);
return -EFAULT;
+ }
} else
memcpy(opt->__data, data, optlen);
}
@@ -509,7 +512,7 @@ int ip_options_get(struct ip_options **optp, unsigned char *data, int optlen, in
opt->is_data = 1;
opt->is_setbyuser = 1;
if (optlen && ip_options_compile(opt, NULL)) {
- kfree_s(opt, sizeof(struct ip_options) + optlen);
+ kfree_s(opt, opt_size);
return -EINVAL;
}
*optp = opt;
diff --git a/pfinet/linux-src/net/ipv4/ip_output.c b/pfinet/linux-src/net/ipv4/ip_output.c
index c8f416ee..d85ba6b5 100644
--- a/pfinet/linux-src/net/ipv4/ip_output.c
+++ b/pfinet/linux-src/net/ipv4/ip_output.c
@@ -782,7 +782,7 @@ void ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*))
/* IF: it doesn't fit, use 'mtu' - the data space left */
if (len > mtu)
len = mtu;
- /* IF: we are not sending upto and including the packet end
+ /* IF: we are not sending up to and including the packet end
then align the next start on an eight byte boundary */
if (len < left) {
len &= ~7;
diff --git a/pfinet/linux-src/net/ipv4/ipconfig.c b/pfinet/linux-src/net/ipv4/ipconfig.c
index 0770bad1..bb95824c 100644
--- a/pfinet/linux-src/net/ipv4/ipconfig.c
+++ b/pfinet/linux-src/net/ipv4/ipconfig.c
@@ -844,7 +844,7 @@ int __init ip_auto_config(void)
}
/*
- * Use defaults whereever applicable.
+ * Use defaults wherever applicable.
*/
if (ic_defaults() < 0)
return -1;
diff --git a/pfinet/linux-src/net/ipv4/ipip.c b/pfinet/linux-src/net/ipv4/ipip.c
index 0aeef4a3..119d7567 100644
--- a/pfinet/linux-src/net/ipv4/ipip.c
+++ b/pfinet/linux-src/net/ipv4/ipip.c
@@ -365,7 +365,7 @@ void ipip_err(struct sk_buff *skb, unsigned char *dp, int len)
/* Impossible event. */
return;
case ICMP_FRAG_NEEDED:
- /* And it is the only really necesary thing :-) */
+ /* And it is the only really necessary thing :-) */
rel_info = ntohs(skb->h.icmph->un.frag.mtu);
if (rel_info < hlen+68)
return;
diff --git a/pfinet/linux-src/net/ipv4/raw.c b/pfinet/linux-src/net/ipv4/raw.c
index 5e7910dd..a0aaa82e 100644
--- a/pfinet/linux-src/net/ipv4/raw.c
+++ b/pfinet/linux-src/net/ipv4/raw.c
@@ -379,7 +379,7 @@ static void raw_close(struct sock *sk, long timeout)
sk->state = TCP_CLOSE;
raw_v4_unhash(sk);
/*
- B. Raw sockets may have direct kernel refereneces. Kill them.
+ B. Raw sockets may have direct kernel references. Kill them.
*/
ip_ra_control(sk, 0, NULL);
diff --git a/pfinet/linux-src/net/ipv4/tcp.c b/pfinet/linux-src/net/ipv4/tcp.c
index cf8cee22..8cde3854 100644
--- a/pfinet/linux-src/net/ipv4/tcp.c
+++ b/pfinet/linux-src/net/ipv4/tcp.c
@@ -1218,7 +1218,7 @@ int tcp_recvmsg(struct sock *sk, struct msghdr *msg,
break;
/* We need to check signals first, to get correct SIGURG
- * handling. FIXME: Need to check this doesnt impact 1003.1g
+ * handling. FIXME: Need to check this doesn't impact 1003.1g
* and move it down to the bottom of the loop
*/
if (signal_pending(current)) {
diff --git a/pfinet/linux-src/net/ipv4/tcp_input.c b/pfinet/linux-src/net/ipv4/tcp_input.c
index 7f5cc4e7..e84eaf43 100644
--- a/pfinet/linux-src/net/ipv4/tcp_input.c
+++ b/pfinet/linux-src/net/ipv4/tcp_input.c
@@ -130,7 +130,7 @@ static __inline__ void tcp_remember_ack(struct tcp_opt *tp, struct tcphdr *th,
{
tp->delayed_acks++;
- /* Tiny-grams with PSH set artifically deflate our
+ /* Tiny-grams with PSH set artificially deflate our
* ato measurement, but with a lower bound.
*/
if(th->psh && (skb->len < (tp->mss_cache >> 1))) {
@@ -989,7 +989,7 @@ tcp_timewait_state_process(struct tcp_tw_bucket *tw, struct sk_buff *skb,
/* Check RST or SYN */
if(th->rst || th->syn) {
- /* This is TIME_WAIT assasination, in two flavors.
+ /* This is TIME_WAIT assassination, in two flavors.
* Oh well... nobody has a sufficient solution to this
* protocol bug yet.
*/
@@ -1931,7 +1931,7 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
* Dave!!! Phrase above (and all about rcv_mss) has
* nothing to do with reality. rcv_mss must measure TOTAL
* size, including sacks, IP options etc. Hence, measure_rcv_mss
- * must occure before pulling etc, otherwise it will flap
+ * must occur before pulling etc, otherwise it will flap
* like hell. Even putting it before tcp_data is wrong,
* it should use skb->tail - skb->nh.raw instead.
* --ANK (980805)
@@ -1939,7 +1939,7 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
* BTW I broke it. Now all TCP options are handled equally
* in mss_clamp calculations (i.e. ignored, rfc1122),
* and mss_cache does include all of them (i.e. tstamps)
- * except for sacks, to calulate effective mss faster.
+ * except for sacks, to calculate effective mss faster.
* --ANK (980805)
*/
tcp_measure_rcv_mss(sk, skb);
diff --git a/pfinet/linux-src/net/ipv4/tcp_ipv4.c b/pfinet/linux-src/net/ipv4/tcp_ipv4.c
index ab6db9bb..99194238 100644
--- a/pfinet/linux-src/net/ipv4/tcp_ipv4.c
+++ b/pfinet/linux-src/net/ipv4/tcp_ipv4.c
@@ -1516,7 +1516,7 @@ struct sock * tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
#ifdef CONFIG_IP_TRANSPARENT_PROXY
/* The new socket created for transparent proxy may fall
* into a non-existed bind bucket because sk->num != newsk->num.
- * Ensure existance of the bucket now. The placement of the check
+ * Ensure existence of the bucket now. The placement of the check
* later will require to destroy just created newsk in the case of fail.
* 1998/04/22 Andrey V. Savochkin <saw@msu.ru>
*/
diff --git a/pfinet/linux-src/net/ipv4/tcp_output.c b/pfinet/linux-src/net/ipv4/tcp_output.c
index 2ac5e8a2..9ea4b7ad 100644
--- a/pfinet/linux-src/net/ipv4/tcp_output.c
+++ b/pfinet/linux-src/net/ipv4/tcp_output.c
@@ -257,7 +257,7 @@ static int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len)
for TCP options, but includes only bare TCP header.
tp->mss_clamp is mss negotiated at connection setup.
- It is minumum of user_mss and mss received with SYN.
+ It is minimum of user_mss and mss received with SYN.
It also does not include TCP options.
tp->pmtu_cookie is last pmtu, seen by this function.