Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLIXON is not waiting for the hello message #184

Closed
dima1308 opened this issue Mar 4, 2021 · 3 comments
Closed

CLIXON is not waiting for the hello message #184

dima1308 opened this issue Mar 4, 2021 · 3 comments
Labels

Comments

@dima1308
Copy link

dima1308 commented Mar 4, 2021

Hi @olofhagsand please see:

dimag@dali:~$ ssh admin@10.40.0.175 -s netconf
admin@10.40.0.175's password:
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="42"><capabilities><capability>urn:ietf:params:netconf:base:1.0</capability><capability>urn:ietf:params:netconf:capability:candidate:1.0</capability><capability>urn:ietf:params:netconf:capability:validate:1.1</capability><capability>urn:ietf:params:netconf:capability:startup:1.0</capability><capability>urn:ietf:params:netconf:capability:xpath:1.0</capability><capability>urn:ietf:params:netconf:capability:notification:1.0</capability></capabilities><session-id>19</session-id></hello>]]>]]><rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><get-config><source><running/></source></get-config></rpc>]]>]]>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><data><database-version xmlns="http://siklu.com/yang/tg/database-version"><database-version-number>11</database-version-number></database-version><interfaces xmlns="http://siklu.com/yang/tg/interfaces"><ports><name>eth1</name><admin-status>up</admin-status><copper-specific-config><auto-negotiate>true</auto-negotiate></copper-specific-config></ports><ports><name>eth2</name><admin-status>up</admin-status><copper-specific-config><auto-negotiate>true</auto-negotiate></copper-specific-config></ports><ports><name>eth3</name><admin-status>up</admin-status><copper-specific-config><auto-negotiate>true</auto-negotiate></copper-specific-config></ports></interfaces><ip xmlns="http://siklu.com/yang/tg/ip"><ipv4><address><ip>192.168.0.1</ip><prefix-length>24</prefix-length></address></ipv4></ip><radio-common xmlns="http://siklu.com/yang/tg/radio"><node-config><default-ssid-profile><ssid>MultiHaul</ssid><password>MultiHaul</password></default-ssid-profile><enable-dynamic-bandwidth-allocation>false</enable-dynamic-bandwidth-allocation><operation-mode>BU</operation-mode></node-config><sectors-config><sector><index>1</index><admin-status>up</admin-status></sector><sector><index>2</index><admin-status>up</admin-status></sector><sector><index>3</index><admin-status>up</admin-status></sector><sector><index>4</index><admin-status>up</admin-status></sector></sectors-config></radio-common><radio-dn xmlns="http://siklu.com/yang/tg/radio/dn"><node-config><default-radio-profile><polarity>even</polarity><frequency>60480</frequency><tx-golay-index>1</tx-golay-index><rx-golay-index>1</rx-golay-index></default-radio-profile><is-pop-dn>false</is-pop-dn></node-config><sectors-config><sector><index>1</index><radio-profile><polarity>unspecified</polarity><frequency>unspecified</frequency><tx-golay-index>unspecified</tx-golay-index><rx-golay-index>unspecified</rx-golay-index></radio-profile></sector><sector><index>2</index><radio-profile><polarity>unspecified</polarity><frequency>unspecified</frequency><tx-golay-index>unspecified</tx-golay-index><rx-golay-index>unspecified</rx-golay-index></radio-profile></sector><sector><index>3</index><radio-profile><polarity>unspecified</polarity><frequency>unspecified</frequency><tx-golay-index>unspecified</tx-golay-index><rx-golay-index>unspecified</rx-golay-index></radio-profile></sector><sector><index>4</index><radio-profile><polarity>unspecified</polarity><frequency>unspecified</frequency><tx-golay-index>unspecified</tx-golay-index><rx-golay-index>unspecified</rx-golay-index></radio-profile></sector></sectors-config></radio-dn><system xmlns="http://siklu.com/yang/tg/system"><name>39406788</name></system><user-bridge xmlns="http://siklu.com/yang/tg/user-bridge"><bridge><bridge-id>1</bridge-id><bridge-port><bridge-port-id>1</bridge-port-id><interface>eth3</interface><bridge-port-type>transparent</bridge-port-type></bridge-port><bridge-port><bridge-port-id>2</bridge-port-id><interface>eth2</interface><bridge-port-type>transparent</bridge-port-type></bridge-port><bridge-port><bridge-port-id>3</bridge-port-id><interface>host</interface><bridge-port-type>transparent</bridge-port-type></bridge-port><bridge-port><bridge-port-id>4</bridge-port-id><interface>eth1</interface><bridge-port-type>transparent</bridge-port-type></bridge-port></bridge></user-bridge><user-management xmlns="http://siklu.com/yang/tg/user-management"><user><username>admin</username><password>$5$dSjPw/1Isj3GgC6v$pK6ACqKpJIZ9OyFDpZ6bZASow4.QlIIjLowb.fYZ/1C</password></user><user><username>ju55lia</username><password>$5$YsUmQx3IeYHYnZSQ$IJHAeApxXjPAtfrZb1E1yVO0bdI7pSTiCfFNGHIM4NC</password></user><user><username>julia</username><password>$5$xYAfZJBsp1adI7sy$ojWBnUOPARo78/E2/XC49mux8LzJfMSVTqFP1JKQwF3</password></user></user-management></data></rpc-reply>]]>]]>

As you can see we can run RPC even without sending a "hello" message. Is it possible to fix it?

@olofhagsand olofhagsand added the bug label Mar 5, 2021
@olofhagsand
Copy link
Member

It is correct that Clixon deviates from the following in RFC 6241, Sec 8.1:

When the NETCONF session is opened, each peer (both client and server) MUST send a element containing a list of that peer's capabilities.

Clixon does not require either part to send the hello message, and it should do so.

olofhagsand added a commit that referenced this issue Mar 10, 2021
* Hello message semantics has been made stricter according to RFC 6241 Sec 8.1, for example:
  * A client MUST send a <hello> element.
  * Each peer MUST send at least the base NETCONF capability, "urn:ietf:params:netconf:base:1.1" (or 1.0 for RFC 4741)
  * The netconf client will terminate (close the socket) if the client does not comply
  * You can set `CLICON_NETCONF_HELLO_OPTIONAL` to true to use the old behavior of essentially ignoring hellos.
* New clixon-config@2020-03-08.yang revision
  * Added: `CLICON_NETCONF_HELLO_OPTIONAL`
* The base capability has been changed to "urn:ietf:params:netconf:base:1.1" following RFC6241.
@olofhagsand
Copy link
Member

See patch above. Please verify.

@dima1308
Copy link
Author

thanks, will do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants