Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Fix errno on rt_setgate error



details:   https://anonhg.NetBSD.org/src/rev/912346550677
branches:  trunk
changeset: 815006:912346550677
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Mon Apr 25 10:55:01 2016 +0000

description:
Fix errno on rt_setgate error

I bet it's not EDQUOT (Disc quota exceeded).

diffstat:

 sys/net/rtsock.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (34 lines):

diff -r e69d7e0f2d5e -r 912346550677 sys/net/rtsock.c
--- a/sys/net/rtsock.c  Mon Apr 25 02:01:32 2016 +0000
+++ b/sys/net/rtsock.c  Mon Apr 25 10:55:01 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtsock.c,v 1.182 2016/04/08 12:01:22 christos Exp $    */
+/*     $NetBSD: rtsock.c,v 1.183 2016/04/25 10:55:01 ozaki-r Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.182 2016/04/08 12:01:22 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.183 2016/04/25 10:55:01 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -739,9 +739,12 @@
                         */
                        if ((error = rt_getifa(&info)) != 0)
                                senderr(error);
-                       if (info.rti_info[RTAX_GATEWAY] &&
-                           rt_setgate(rt, info.rti_info[RTAX_GATEWAY]))
-                               senderr(EDQUOT);
+                       if (info.rti_info[RTAX_GATEWAY]) {
+                               error = rt_setgate(rt,
+                                   info.rti_info[RTAX_GATEWAY]);
+                               if (error != 0)
+                                       senderr(error);
+                       }
                        if (info.rti_info[RTAX_TAG])
                                rt_settag(rt, info.rti_info[RTAX_TAG]);
                        /* new gateway could require new ifaddr, ifp;



Home | Main Index | Thread Index | Old Index