* virual hostname support for sm-notify on SuSE
@ 2006-01-04 6:02 mehta kiran
2006-01-28 2:21 ` virtual " Marc Eshel
0 siblings, 1 reply; 4+ messages in thread
From: mehta kiran @ 2006-01-04 6:02 UTC (permalink / raw)
To: nfs; +Cc: okir
Hi,
I have noticed that
sm-notify -v <virtual ip> works=20
while sm-notify -v <virtual name> does not work.
Virtual name may be required if nfs server fails=20
over across subnets.
=20
thanks,
kiran
=09
__________________________________________=20
Yahoo! DSL =96 Something to write home about.=20
Just $16.99/mo. or less.=20
dsl.yahoo.com=20
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi=
les
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: virtual hostname support for sm-notify on SuSE 2006-01-04 6:02 virual hostname support for sm-notify on SuSE mehta kiran @ 2006-01-28 2:21 ` Marc Eshel 2006-01-28 2:31 ` Marc Eshel 0 siblings, 1 reply; 4+ messages in thread From: Marc Eshel @ 2006-01-28 2:21 UTC (permalink / raw) To: okir, mehta kiran; +Cc: nfs, nfs-admin, Manoj Naik 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: virtual hostname support for sm-notify on SuSE 2006-01-28 2:21 ` virtual " Marc Eshel @ 2006-01-28 2:31 ` Marc Eshel 2006-01-30 9:56 ` Olaf Kirch 0 siblings, 1 reply; 4+ messages in thread From: Marc Eshel @ 2006-01-28 2:31 UTC (permalink / raw) To: Marc Eshel; +Cc: okir, mehta kiran, nfs, nfs-admin, Manoj Naik 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: virtual hostname support for sm-notify on SuSE 2006-01-28 2:31 ` Marc Eshel @ 2006-01-30 9:56 ` Olaf Kirch 0 siblings, 0 replies; 4+ messages in thread From: Olaf Kirch @ 2006-01-30 9:56 UTC (permalink / raw) To: Marc Eshel; +Cc: mehta kiran, nfs, nfs-admin, Manoj Naik Hi Marc, I don't remember seeing that request, sorry. SLES10 will have a fix for this (which uses getaddrinfo rather than gethostbyname, but otherwise it should work the same way as your patch) Thanks, Olaf -- Olaf Kirch | --- o --- Nous sommes du soleil we love when we play okir@suse.de | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax ------------------------------------------------------- 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-01-30 9:56 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2006-01-30 9:56 ` Olaf Kirch
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.