On Mon, Aug 12, 2002 at 03:19:24PM +0530, Atanu Das wrote:
> Hello FreeRadius Users,
> 
> radrelay program is showing segmentation fault. I followed the procedure as 
>mentioned in the document of "radrelay" program.
> 
> radrelay -n test
> 
> Segmentation Fault

Actually, you didn't follow the procedure described in the radrelay
documentation, you didn't supply a detailfile name. You should have done
something like: ./radrelay -n test detail-combined

The segmentation fault otoh is a stupid bug by me. Patch included
against current cvs, some very minor documentation updates are included
to. Be good if this could be applied.

-- 
Simon


diff -urN --exclude=CVS radiusd.orig/man/man8/radrelay.8 radiusd/man/man8/radrelay.8
--- radiusd.orig/man/man8/radrelay.8    Wed Jul 10 10:09:12 2002
+++ radiusd/man/man8/radrelay.8 Tue Aug 13 15:54:17 2002
@@ -13,7 +13,7 @@
 .RB [ \-n
 .IR shortname ]
 .RB [ \-r
-.IR remote-server ]
+.IR remote-server[:port] ]
 .RB [ \-s
 .IR secret ]
 .RB [ \-S
@@ -49,8 +49,11 @@
 this way. Do not use the -r, -s or -S parameters in combination with -n.
 
 .IP "\-r \fIremote-server\fP"
-The remote server that will be recieving the accounting packets.
-The -r parameter can't be used in combination with -n.
+The hostname or IP address of the remote server. Optionally a UDP port
+can be specified. If no UDP port is specified, it is looked up in
+\fI/etc/services\fP. The service name looked for is \fBradacct\fP for
+accounting packets. If a service is not found in \fI/etc/services\fP,
+1813 is used. The -r parameter can't be used in combination with -n.
 
 .IP "\-s \fIsecret\fP"
 Remote server secret.
@@ -62,13 +65,6 @@
 .IP \-x
 Enable debug mode, -x will activate radrelay internal debugging, -xx will
 also activate librad debugging.
-
-.IP "server[:port]"
-The hostname or IP address of the remote server. Optionally a UDP port
-can be specified. If no UDP port is specified, it is looked up in
-\fI/etc/services\fP. The service name looked for is \fBradacct\fP for
-accounting packets. If a service is not found in \fI/etc/services\fP,
-1813 is used.
 
 .IP "detailfile"
 The detail file to use, this will be appended to the base accounting
diff -urN --exclude=CVS radiusd.orig/src/main/radrelay.c radiusd/src/main/radrelay.c
--- radiusd.orig/src/main/radrelay.c    Wed Jul 10 10:09:14 2002
+++ radiusd/src/main/radrelay.c Tue Aug 13 15:50:19 2002
@@ -800,6 +800,10 @@
                usage();
        if (r_args.secret != NULL && shortname != NULL)
                usage();
+       if (!argv[1])
+               usage();
+       if (!strlen(argv[1]))
+               usage();
 
        /*
         * If we've been given a shortname, try to fetch the secret and

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to