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

Add IPv6 Support in TACACS #3395

Merged
merged 3 commits into from
Sep 3, 2019
Merged

Add IPv6 Support in TACACS #3395

merged 3 commits into from
Sep 3, 2019

Conversation

SuvarnaMeenakshi
Copy link
Contributor

@SuvarnaMeenakshi SuvarnaMeenakshi commented Aug 29, 2019

- What I did
Added support in PAM and NSS library to support IPv6 addresses.

- How I did it
It is mainly to change the way the IP address and port number is parsed from the string ip addr: port#.

In current code, they look for the first ‘:’ and anything after that is port number. This does not work for IPv6 as ‘:’ exists in address. SO I changed it to look at the last ‘:’ instead.

- How to verify it
Started tac_plus server which has IPv6 address.
Pulled the tac_plus code from:
https://launchpad.net/ubuntu/+source/tacacs+/4.0.4.27a-3
Started the tac_plus service on server side listening in the default port (49).

Added the configs in DUT.
sudo config tacacs authtype login
sudo config tacacs passkey testing123
sudo config aaa authentication login tacacs+
sudo config tacacs add IPv6 server address

$ show tacacs
TACPLUS global auth_type login
TACPLUS global timeout 5 (default)
TACPLUS global passkey testing123

TACPLUS_SERVER address IPv6 server address
priority 1
tcp_port 49

From an external server, tried logging in to the SONiC device as a test user defined in the tacacs server, was able to login successfully.

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@renukamanavalan
Copy link
Contributor

What is the addition " __vrfname = strdup(*argv + 4);" for ?

@renukamanavalan
Copy link
Contributor

There is a problem in applying the patch.

HEAD is now at 8dddbec... fix links
error: patch failed: support.c:36
error: support.c: patch does not apply
Makefile:10: recipe for target '/sonic/target/debs/stretch/libpam-tacplus_1.4.1-1_amd64.deb' failed
make[1]: *** [/sonic/target/debs/stretch/libpam-tacplus_1.4.1-1_amd64.deb] Error 1

@lguohan
Copy link
Collaborator

lguohan commented Aug 29, 2019

looks like the build is broken.

@SuvarnaMeenakshi SuvarnaMeenakshi merged commit 1b0e900 into sonic-net:master Sep 3, 2019
@SuvarnaMeenakshi SuvarnaMeenakshi deleted the tacacs_ipv6 branch September 3, 2019 20:24
yxieca pushed a commit that referenced this pull request Sep 5, 2019
* Add patch to support IPv6

* Add support for IPv6

* Remove in-correct changes by IPv6 support patch
sridhar-ravindran pushed a commit to sridhar-ravindran/sonic-buildimage that referenced this pull request Sep 6, 2019
* Add patch to support IPv6

* Add support for IPv6

* Remove in-correct changes by IPv6 support patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants