Fix notification sub-error code for syntactically incorrect nexthops.
authorclaudio <claudio@openbsd.org>
Tue, 27 Apr 2021 09:07:10 +0000 (09:07 +0000)
committerclaudio <claudio@openbsd.org>
Tue, 27 Apr 2021 09:07:10 +0000 (09:07 +0000)
The right suberror is ERR_UPD_NEXTHOP.
Reported by cjt (melissa_cjt at 163.com)
OK benno@

usr.sbin/bgpd/rde.c

index 6a15c89..bb3be1a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: rde.c,v 1.518 2021/04/24 17:04:24 deraadt Exp $ */
+/*     $OpenBSD: rde.c,v 1.519 2021/04/27 09:07:10 claudio Exp $ */
 
 /*
  * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1710,7 +1710,7 @@ bad_flags:
                 */
                tmp32 = ntohl(nexthop.v4.s_addr);
                if (IN_MULTICAST(tmp32) || IN_BADCLASS(tmp32)) {
-                       rde_update_err(peer, ERR_UPDATE, ERR_UPD_NETWORK,
+                       rde_update_err(peer, ERR_UPDATE, ERR_UPD_NEXTHOP,
                            op, len);
                        return (-1);
                }