Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75317
b: refs/heads/master
c: f844c74
h: refs/heads/master
i:
  75315: 9002ef2
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Jan 9, 2008
1 parent 2f30f63 commit 376fd4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cb77df3ec88f07c6141924dfe6fd96a2f541cc09
refs/heads/master: f844c74fe07321953e2dd227fe35280075f18f60
4 changes: 3 additions & 1 deletion trunk/net/ipv4/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length,
int hh_len;
struct iphdr *iph;
struct sk_buff *skb;
unsigned int iphlen;
int err;

if (length > rt->u.dst.dev->mtu) {
Expand Down Expand Up @@ -304,7 +305,8 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length,
goto error_fault;

/* We don't modify invalid header */
if (length >= sizeof(*iph) && iph->ihl * 4U <= length) {
iphlen = iph->ihl * 4;
if (iphlen >= sizeof(*iph) && iphlen <= length) {
if (!iph->saddr)
iph->saddr = rt->rt_src;
iph->check = 0;
Expand Down

0 comments on commit 376fd4b

Please sign in to comment.