mirror of
https://github.com/rtbrick/bngblaster.git
synced 2024-05-06 15:54:57 +00:00
LDP fix MPLS TTL and EXP
This commit is contained in:
committed by
Christian Giese
parent
6b90bff389
commit
cc38610fa6
@@ -1641,32 +1641,33 @@ json_parse_stream(json_t *stream, bbl_stream_config_s *stream_config)
|
||||
if(value) {
|
||||
stream_config->tx_mpls1 = true;
|
||||
stream_config->tx_mpls1_label = json_number_value(value);
|
||||
value = json_object_get(stream, "tx-label1-exp");
|
||||
if(value) {
|
||||
stream_config->tx_mpls1_exp = json_number_value(value);
|
||||
}
|
||||
value = json_object_get(stream, "tx-label1-ttl");
|
||||
if(value) {
|
||||
stream_config->tx_mpls1_ttl = json_number_value(value);
|
||||
} else {
|
||||
stream_config->tx_mpls1_ttl = 255;
|
||||
}
|
||||
}
|
||||
value = json_object_get(stream, "tx-label1-exp");
|
||||
if(value) {
|
||||
stream_config->tx_mpls1_exp = json_number_value(value);
|
||||
}
|
||||
value = json_object_get(stream, "tx-label1-ttl");
|
||||
if(value) {
|
||||
stream_config->tx_mpls1_ttl = json_number_value(value);
|
||||
} else {
|
||||
stream_config->tx_mpls1_ttl = 255;
|
||||
}
|
||||
value = json_object_get(stream, "tx-label2");
|
||||
if(value) {
|
||||
stream_config->tx_mpls2 = true;
|
||||
stream_config->tx_mpls2_label = json_number_value(value);
|
||||
value = json_object_get(stream, "tx-label2-exp");
|
||||
if(value) {
|
||||
stream_config->tx_mpls2_exp = json_number_value(value);
|
||||
}
|
||||
value = json_object_get(stream, "tx-label2-ttl");
|
||||
if(value) {
|
||||
stream_config->tx_mpls2_ttl = json_number_value(value);
|
||||
} else {
|
||||
stream_config->tx_mpls2_ttl = 255;
|
||||
}
|
||||
}
|
||||
value = json_object_get(stream, "tx-label2-exp");
|
||||
if(value) {
|
||||
stream_config->tx_mpls2_exp = json_number_value(value);
|
||||
}
|
||||
value = json_object_get(stream, "tx-label2-ttl");
|
||||
if(value) {
|
||||
stream_config->tx_mpls2_ttl = json_number_value(value);
|
||||
} else {
|
||||
stream_config->tx_mpls2_ttl = 255;
|
||||
}
|
||||
|
||||
value = json_object_get(stream, "rx-label1");
|
||||
if(value) {
|
||||
stream_config->rx_mpls1 = true;
|
||||
|
||||
Reference in New Issue
Block a user