diff options
Diffstat (limited to 'net/ipv4/ip_gre.c')
-rw-r--r-- | net/ipv4/ip_gre.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index c0c5274d0271..f47c9f76754b 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -1144,12 +1144,9 @@ static int ipgre_header(struct sk_buff *skb, struct net_device *dev, | |||
1144 | 1144 | ||
1145 | if (saddr) | 1145 | if (saddr) |
1146 | memcpy(&iph->saddr, saddr, 4); | 1146 | memcpy(&iph->saddr, saddr, 4); |
1147 | 1147 | if (daddr) | |
1148 | if (daddr) { | ||
1149 | memcpy(&iph->daddr, daddr, 4); | 1148 | memcpy(&iph->daddr, daddr, 4); |
1150 | return t->hlen; | 1149 | if (iph->daddr) |
1151 | } | ||
1152 | if (iph->daddr && !ipv4_is_multicast(iph->daddr)) | ||
1153 | return t->hlen; | 1150 | return t->hlen; |
1154 | 1151 | ||
1155 | return -t->hlen; | 1152 | return -t->hlen; |