Every so often when my VPN link provided by user ppp goes away, and when
I restart it I see an error saying that a route cannot be added because
my disc quota has been exceeded.  This is coming from route.c in the
rt_setgate() function at line 1001 on -current.  My question is should
this be a different error?  EDEADLK seems more accurate, or at least
EEXIST.  Given this doesn't happen often, but it can still be confusing.

>From man intro(2):

"EDQUOT Disc quota exceeded.  A write(2) to an ordinary file, the
creation of a directory or symbolic link, or the creation of a directory
entry failed because the user's quota of disk blocks was exhausted, or
the allocation of an inode for a newly created file failed because the
user's quota of inodes was exhausted."

It doesn't mention anything about a recursive routing problem.  Attached
are patches for both errnos above.

Joe



--- sys/net/route.c.orig        Thu Mar  7 22:40:02 2002
+++ sys/net/route.c     Thu Mar  7 22:41:54 2002
@@ -998,7 +998,7 @@
                if (rt->rt_gwroute == rt) {
                        RTFREE(rt->rt_gwroute);
                        rt->rt_gwroute = 0;
-                       return EDQUOT; /* failure */
+                       return EDEADLK; /* failure */
                }
        }
 
--- sys/net/route.c.orig        Thu Mar  7 22:40:02 2002
+++ sys/net/route.c     Thu Mar  7 22:43:56 2002
@@ -998,7 +998,7 @@
                if (rt->rt_gwroute == rt) {
                        RTFREE(rt->rt_gwroute);
                        rt->rt_gwroute = 0;
-                       return EDQUOT; /* failure */
+                       return EEXIST; /* failure */
                }
        }
 

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to