From: Marc Eshel <eshel@almaden.ibm.com>
To: Marc Eshel <eshel@almaden.ibm.com>
Cc: okir@suse.de, mehta kiran <kiranmehta1981@yahoo.com>,
nfs@lists.sourceforge.net, nfs-admin@lists.sourceforge.net,
Manoj Naik <manoj@almaden.ibm.com>
Subject: Re: virtual hostname support for sm-notify on SuSE
Date: Fri, 27 Jan 2006 18:31:32 -0800 [thread overview]
Message-ID: <43DAD784.8050409@almaden.ibm.com> (raw)
In-Reply-To: <OF322A73D5.EFCAF050-ON88257104.000C2815-88257104.000CB1F4@us.ibm.com>
Here is the patch again from a mailer that doesn't change your text.
Marc.
--- sm-notify.c.orig 2006-01-27 16:58:47.913561080 -0800
+++ sm-notify.c 2006-01-27 16:59:11.855921288 -0800
@@ -183,12 +183,16 @@ notify(void)
sin.sin_family = AF_INET;
/* Bind source IP if provided on command line */
- if (opt_srcaddr
- && inet_aton(opt_srcaddr, &sin.sin_addr) == 0) {
- fprintf(stderr,
- "Not a valid IP address: \"%s\"\n",
- opt_srcaddr);
- exit(1);
+ if (opt_srcaddr) {
+ struct hostent *hp = gethostbyname(opt_srcaddr);
+ if (hp)
+ sin.sin_addr = *(struct in_addr *)hp->h_addr;
+ else {
+ fprintf(stderr,
+ "Not a valid IP address: \"%s\"\n",
+ opt_srcaddr);
+ exit(1);
+ }
}
/* Use source port if provided on the command line,
Marc Eshel wrote:
>Hi Olaf
>I asked for this fix a couple of years ago, here is the fix for this
>problem.
>Marc.
>
>
>--- sm-notify.c.orig 2006-01-27 16:58:47.913561080 -0800
>+++ sm-notify.c 2006-01-27 16:59:11.855921288 -0800
>@@ -183,12 +183,16 @@ notify(void)
> sin.sin_family = AF_INET;
>
> /* Bind source IP if provided on command line */
>- if (opt_srcaddr
>- && inet_aton(opt_srcaddr, &sin.sin_addr) == 0) {
>- fprintf(stderr,
>- "Not a valid IP address:
>\"%s\"\n",
>- opt_srcaddr);
>- exit(1);
>+ if (opt_srcaddr) {
>+ struct hostent *hp =
>gethostbyname(opt_srcaddr);
>+ if (hp)
>+ sin.sin_addr = *(struct
>in_addr *)hp->h_addr;
>+ else {
>+ fprintf(stderr,
>+ "Not a
>valid IP address: \"%s\"\n",
>+ opt_srcaddr);
>+ exit(1);
>+ }
> }
>
> /* Use source port if provided on the command line,
>
>-------------------------------------------------------------------------------------------------------------------------------
>nfs-admin@lists.sourceforge.net wrote on 01/03/2006 10:02:44 PM:
>
>
>
>>Hi,
>> I have noticed that
>> sm-notify -v <virtual ip> works
>> while sm-notify -v <virtual name> does not work.
>> Virtual name may be required if nfs server fails
>> over across subnets.
>>
>>
>>thanks,
>> kiran
>>
>>
>
>
>
>>_______________________________________________
>>NFS maillist - NFS@lists.sourceforge.net
>>https://lists.sourceforge.net/lists/listinfo/nfs
>>
>>
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
>for problems? Stop! Download the new AJAX search engine that makes
>searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
>_______________________________________________
>NFS maillist - NFS@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/nfs
>
>
>
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next prev parent reply other threads:[~2006-01-28 2:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-04 6:02 virual hostname support for sm-notify on SuSE mehta kiran
2006-01-28 2:21 ` virtual " Marc Eshel
2006-01-28 2:31 ` Marc Eshel [this message]
2006-01-30 9:56 ` Olaf Kirch
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=43DAD784.8050409@almaden.ibm.com \
--to=eshel@almaden.ibm.com \
--cc=kiranmehta1981@yahoo.com \
--cc=manoj@almaden.ibm.com \
--cc=nfs-admin@lists.sourceforge.net \
--cc=nfs@lists.sourceforge.net \
--cc=okir@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.