]> git.puffer.fish Git - mirror/frr.git/commitdiff
bfdd: don't allow VRF for single hop session
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Sat, 2 Feb 2019 12:00:09 +0000 (10:00 -0200)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Thu, 14 Feb 2019 16:18:23 +0000 (14:18 -0200)
Single hop sessions already allow you to select the interface, which
should be enough to determine the VRF we are running in.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
bfdd/bfdd_vty.c

index 8d99ccc693b6654bee45a4f5aa2bb4c6085366ce..ed1c434c8effe8cf8ce7ff242b297a373a8b8a05 100644 (file)
@@ -131,6 +131,10 @@ DEFUN_NOSH(
                vty_out(vty, "%% VRF is not mixable with interface\n");
                return CMD_WARNING_CONFIG_FAILED;
        }
+       if (vrfname && !mhop) {
+               vty_out(vty, "%% VRF only applies with multihop.\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
 
        strtosa(peer, &psa);
        if (local) {