From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrey Ignatov Subject: [PATCH bpf 0/2] bpf: Fix [::] -> [::1] rewrite in sys_sendmsg Date: Thu, 3 Jan 2019 14:43:18 -0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Cc: Andrey Ignatov , , , , To: Return-path: Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:47204 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728601AbfACWns (ORCPT ); Thu, 3 Jan 2019 17:43:48 -0500 Received: from pps.filterd (m0109331.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x03McG9U016479 for ; Thu, 3 Jan 2019 14:43:47 -0800 Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2psrk8gj58-6 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 03 Jan 2019 14:43:47 -0800 Sender: netdev-owner@vger.kernel.org List-ID: The patch set fixes BSD'ism in sys_sendmsg to rewrite unspecified destination IPv6 for unconnected UDP sockets in sys_sendmsg with [::1] in case when either CONFIG_CGROUP_BPF is enabled or when sys_sendmsg BPF hook sets destination IPv6 to [::]. Patch 1 is the fix and provides more details. Patch 2 adds two test cases to verify the fix. Andrey Ignatov (2): bpf: Fix [::] -> [::1] rewrite in sys_sendmsg selftests/bpf: Test [::] -> [::1] rewrite in sys_sendmsg in test_sock_addr net/ipv6/udp.c | 8 +-- tools/testing/selftests/bpf/test_sock_addr.c | 53 ++++++++++++++++++-- 2 files changed, 54 insertions(+), 7 deletions(-) -- 2.17.1