diff options
| author | Russ White <russ@riw.us> | 2025-01-28 12:23:06 -0500 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-28 12:23:06 -0500 | 
| commit | bd82864d03b12723d96bd2e10a2ad9b0de82f6f9 (patch) | |
| tree | aa7d4969adacf6cb04283757a79908a465e3f416 /lib | |
| parent | e82788de4665b5b6a9bc8a9e5af9224d90984a50 (diff) | |
| parent | 91540d2e316ecd391622752096e5099b71d91497 (diff) | |
Merge pull request #17941 from opensourcerouting/fix-dst-src
static: fix botched staticd YANG conversion for dst-src
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/srcdest_table.c | 10 | ||||
| -rw-r--r-- | lib/srcdest_table.h | 2 | ||||
| -rw-r--r-- | lib/zclient.c | 12 | ||||
| -rw-r--r-- | lib/zclient.h | 3 | 
4 files changed, 15 insertions, 12 deletions
diff --git a/lib/srcdest_table.c b/lib/srcdest_table.c index 3247a0372c..7203c8ac8e 100644 --- a/lib/srcdest_table.c +++ b/lib/srcdest_table.c @@ -309,13 +309,3 @@ static ssize_t printfrr_rn(struct fbuf *buf, struct printfrr_eargs *ea,  		    cbuf, sizeof(cbuf));  	return bputs(buf, cbuf);  } - -struct route_table *srcdest_srcnode_table(struct route_node *rn) -{ -	if (rnode_is_dstnode(rn)) { -		struct srcdest_rnode *srn = srcdest_rnode_from_rnode(rn); - -		return srn->src_table; -	} -	return NULL; -} diff --git a/lib/srcdest_table.h b/lib/srcdest_table.h index ff97f9b735..a699d4a11b 100644 --- a/lib/srcdest_table.h +++ b/lib/srcdest_table.h @@ -87,8 +87,6 @@ static inline void *srcdest_rnode_table_info(struct route_node *rn)  	return route_table_get_info(srcdest_rnode_table(rn));  } -extern struct route_table *srcdest_srcnode_table(struct route_node *rn); -  #ifdef __cplusplus  }  #endif diff --git a/lib/zclient.c b/lib/zclient.c index 9f6542eb31..d8c75c9029 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -2124,6 +2124,15 @@ bool zapi_route_notify_decode(struct stream *s, struct prefix *p,  			      enum zapi_route_notify_owner *note,  			      afi_t *afi, safi_t *safi)  { +	struct prefix dummy; + +	return zapi_route_notify_decode_srcdest(s, p, &dummy, tableid, note, afi, safi); +} + +bool zapi_route_notify_decode_srcdest(struct stream *s, struct prefix *p, struct prefix *src_p, +				      uint32_t *tableid, enum zapi_route_notify_owner *note, +				      afi_t *afi, safi_t *safi) +{  	uint32_t t;  	afi_t afi_val;  	safi_t safi_val; @@ -2133,6 +2142,9 @@ bool zapi_route_notify_decode(struct stream *s, struct prefix *p,  	STREAM_GETC(s, p->family);  	STREAM_GETC(s, p->prefixlen);  	STREAM_GET(&p->u.prefix, s, prefix_blen(p)); +	src_p->family = p->family; +	STREAM_GETC(s, src_p->prefixlen); +	STREAM_GET(&src_p->u.prefix, s, prefix_blen(src_p));  	STREAM_GETL(s, t);  	STREAM_GETC(s, afi_val);  	STREAM_GETC(s, safi_val); diff --git a/lib/zclient.h b/lib/zclient.h index f3657822b8..afd84acce2 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -1168,6 +1168,9 @@ bool zapi_route_notify_decode(struct stream *s, struct prefix *p,  			      uint32_t *tableid,  			      enum zapi_route_notify_owner *note,  			      afi_t *afi, safi_t *safi); +bool zapi_route_notify_decode_srcdest(struct stream *s, struct prefix *p, struct prefix *src_p, +				      uint32_t *tableid, enum zapi_route_notify_owner *note, +				      afi_t *afi, safi_t *safi);  bool zapi_rule_notify_decode(struct stream *s, uint32_t *seqno,  			     uint32_t *priority, uint32_t *unique, char *ifname,  			     enum zapi_rule_notify_owner *note);  | 
