diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2017-03-03 17:50:22 -0300 | 
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-03-03 17:50:22 -0300 | 
| commit | aba50a83ea59e20bb23929f817560625153a0e25 (patch) | |
| tree | 364bebda19c78d7518a864f62f40079f05cad680 /ldpd/lde_lib.c | |
| parent | d4afb81972d9666d730445fa81090d711fc0d54f (diff) | |
ldpd: implement RFC 6667 (Typed Wildcard FEC for PWid)
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd/lde_lib.c')
| -rw-r--r-- | ldpd/lde_lib.c | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/ldpd/lde_lib.c b/ldpd/lde_lib.c index 71ab05f04d..4444a1e1ac 100644 --- a/ldpd/lde_lib.c +++ b/ldpd/lde_lib.c @@ -845,6 +845,13 @@ lde_wildcard_apply(struct map *wcard, struct fec *fec, struct lde_map *me)  			    fec->type != FEC_TYPE_IPV6)  				return (0);  			return (1); +		case MAP_TYPE_PWID: +			if (fec->type != FEC_TYPE_PWID) +				return (0); +			if (wcard->fec.twcard.u.pw_type != PW_TYPE_WILDCARD && +			    wcard->fec.twcard.u.pw_type != fec->u.pwid.type) +				return (0); +			return (1);  		default:  			fatalx("lde_wildcard_apply: unexpected fec type");  		}  | 
