From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from stinky.trash.net ([213.144.137.162]:46474 "EHLO stinky.trash.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751527AbYAWOUd (ORCPT ); Wed, 23 Jan 2008 09:20:33 -0500 Message-ID: <47974D07.5040202@trash.net> Date: Wed, 23 Jan 2008 15:19:51 +0100 From: Patrick McHardy MIME-Version: 1.0 Subject: Re: [PATCH] Introducing socket mark socket option References: <12010920051270-git-send-email-panther@balabit.hu> In-Reply-To: <12010920051270-git-send-email-panther@balabit.hu> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Laszlo Attila Toth Cc: Netfilter Developer Mailing List , netdev@vger.kernel.org, linux-arch@vger.kernel.org Laszlo Attila Toth wrote: > A userspace program may wish to set the mark for each packets its send > without using the netfilter MARK target. Changing the mark can be used > mark based routing without netfilter or for packet filtering. > > It requires CAP_NET_ADMIN capability. > > @@ -403,6 +403,7 @@ static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb) > { .daddr = daddr, > .saddr = rt->rt_spec_dst, > .tos = RT_TOS(ip_hdr(skb)->tos) } }, > + .mark = sk->sk_mark, This is useless, the icmp socket is not visible to userspace. > --- a/net/ipv4/ip_output.c > +++ b/net/ipv4/ip_output.c > ... What about IPv6?