netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Laszlo Attila Toth <panther@balabit.hu>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 1/1] socket: Added 'transparent' option
Date: Tue, 05 May 2009 17:52:39 +0200	[thread overview]
Message-ID: <4A0060C7.4060007@trash.net> (raw)
In-Reply-To: <1240589223-12494-1-git-send-email-panther@balabit.hu>

Laszlo Attila Toth wrote:
> Added new revision of the 'socket' match. If its new option is set,
> enabled 'transparent' socket option is required for the socket to be matched.
> 
> +socket_match(const struct sk_buff *skb, const struct xt_match_param *par, bool check_transparent)
>  {
>  	const struct iphdr *iph = ip_hdr(skb);
>  	struct udphdr _hdr, *hp = NULL;
> @@ -142,10 +144,19 @@ socket_mt(const struct sk_buff *skb, const struct xt_match_param *par)
>  				   saddr, daddr, sport, dport, par->in, false);
>  	if (sk != NULL) {
>  		bool wildcard = (sk->sk_state != TCP_TIME_WAIT && inet_sk(sk)->rcv_saddr == 0);
> +		bool transparent = (sk->sk_state != TCP_TIME_WAIT && inet_sk(sk)->transparent) ||
> +				   (sk->sk_state == TCP_TIME_WAIT && inet_twsk(sk)->tw_transparent);
> +		const struct xt_socket_match_info *info;

Please use proper line breaks at 80 characters.



      reply	other threads:[~2009-05-05 15:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-24 16:07 [PATCH 1/1] socket: Added 'transparent' option Laszlo Attila Toth
2009-05-05 15:52 ` Patrick McHardy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A0060C7.4060007@trash.net \
    --to=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=panther@balabit.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).