@@ -2294,7 +2294,7 @@ route_set_l3vpn_nexthop_encapsulation(void *rule, const struct prefix *prefix,
22942294
22952295 path = object ;
22962296
2297- if (rins -> zif_type != ZEBRA_IF_GRE )
2297+ if (rins -> zif_type != ZEBRA_IF_GRE && rins -> zif_type != ZEBRA_IF_GRETAP )
22982298 return RMAP_OKAY ;
22992299
23002300 SET_FLAG (path -> attr -> rmap_change_flags , BATTR_RMAP_L3VPN_ACCEPT_GRE );
@@ -2310,7 +2310,10 @@ static void *route_set_l3vpn_nexthop_encapsulation_compile(const char *arg)
23102310 sizeof (struct rmap_l3vpn_nexthop_encapsulation_set ));
23112311
23122312 /* XXX ALL GRE modes are accepted for now: gre or ip6gre */
2313- rins -> zif_type = ZEBRA_IF_GRE ;
2313+ if (strmatch (arg , "gretap" ))
2314+ rins -> zif_type = ZEBRA_IF_GRETAP ;
2315+ else
2316+ rins -> zif_type = ZEBRA_IF_GRE ;
23142317
23152318 return rins ;
23162319}
@@ -6275,12 +6278,13 @@ DEFUN_YANG (no_set_distance,
62756278}
62766279
62776280DEFPY_YANG (set_l3vpn_nexthop_encapsulation , set_l3vpn_nexthop_encapsulation_cmd ,
6278- "[no] set l3vpn next-hop encapsulation gre" ,
6281+ "[no] set l3vpn next-hop encapsulation < gre|gretap>$ziftype " ,
62796282 NO_STR SET_STR
62806283 "L3VPN operations\n"
62816284 "Next hop Information\n"
62826285 "Encapsulation options (for BGP only)\n"
6283- "Accept L3VPN traffic over GRE encapsulation\n" )
6286+ "Accept L3VPN traffic over GRE encapsulation\n"
6287+ "Accept L3VPN traffic over GRETAP encapsulation\n" )
62846288{
62856289 const char * xpath =
62866290 "./set-action[action='frr-bgp-route-map:set-l3vpn-nexthop-encapsulation']" ;
@@ -6297,7 +6301,7 @@ DEFPY_YANG(set_l3vpn_nexthop_encapsulation, set_l3vpn_nexthop_encapsulation_cmd,
62976301 if (operation == NB_OP_DESTROY )
62986302 return nb_cli_apply_changes (vty , NULL );
62996303
6300- nb_cli_enqueue_change (vty , xpath_value , NB_OP_MODIFY , "gre" );
6304+ nb_cli_enqueue_change (vty , xpath_value , NB_OP_MODIFY , ziftype );
63016305
63026306 return nb_cli_apply_changes (vty , NULL );
63036307}
0 commit comments