From ab863231980775e476c5ea75121e9e20a47291bf Mon Sep 17 00:00:00 2001
From: Andy Whitcroft <apw@canonical.com>
Date: Mon, 12 Feb 2018 17:33:20 +0000
Subject: [PATCH] FIX: backport

Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 net/ipv4/raw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 83a609bc7c57..3b764c0c1fec 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -621,7 +621,7 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
 			goto done;
 	}
 
-	if (hdrincl) {
+	if (!hdrincl) {
 		rfv.msg = msg;
 		rfv.hlen = 0;
 
-- 
2.15.1

