From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
To: Jan Synacek <jsynacek@redhat.com>
Cc: netdev@vger.kernel.org, YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Subject: Re: [PATCH] ping: Wrap SO_BINDTODEVICE with the correct capability.
Date: Tue, 13 Nov 2012 00:25:08 +0900 [thread overview]
Message-ID: <50A114D4.4040201@linux-ipv6.org> (raw)
In-Reply-To: <50A0F570.5090208@redhat.com>
Jan Synacek wrote:
>
> Signed-off-by: Jan Synacek <jsynacek@redhat.com>
> ---
> ping.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/ping.c b/ping.c
> index 2f70cec..c958f1a 100644
> --- a/ping.c
> +++ b/ping.c
> @@ -316,6 +316,9 @@ main(int argc, char **argv)
> struct ifreq ifr;
> memset(&ifr, 0, sizeof(ifr));
> strncpy(ifr.ifr_name, device, IFNAMSIZ-1);
> +
> + enable_capability_raw();
> +
> if (setsockopt(probe_fd, SOL_SOCKET, SO_BINDTODEVICE, device,
> strlen(device)+1) == -1) {
> if (IN_MULTICAST(ntohl(dst.sin_addr.s_addr))) {
> struct ip_mreqn imr;
> @@ -331,6 +334,8 @@ main(int argc, char **argv)
> }
> }
> }
> +
> + disable_capability_raw();
> }
>
> if (settos &&
>
Oh, you're right. Applied, thank you.
--yoshfuji
prev parent reply other threads:[~2012-11-12 15:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-12 13:11 [PATCH] ping: Wrap SO_BINDTODEVICE with the correct capability Jan Synacek
2012-11-12 15:25 ` YOSHIFUJI Hideaki [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=50A114D4.4040201@linux-ipv6.org \
--to=yoshfuji@linux-ipv6.org \
--cc=jsynacek@redhat.com \
--cc=netdev@vger.kernel.org \
/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).