mirror of
https://github.com/qosmio/nss-packages.git
synced 2025-12-18 01:01:43 +00:00
41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
commit f8cf061454a3707c0c84d0fca685e84455f91362
|
|
Author: Suruchi Suman <surusuma@codeaurora.org>
|
|
Date: Tue Dec 3 12:57:38 2019 +0530
|
|
|
|
[qca-nss-drv] Exported set nexhop function from drv.
|
|
|
|
Change-Id: I3df6658bef72fe574ac9acfb7aac61785769766f
|
|
Signed-off-by: Suruchi Suman <surusuma@codeaurora.org>
|
|
|
|
--- a/nss_phys_if.c
|
|
+++ b/nss_phys_if.c
|
|
@@ -1,6 +1,6 @@
|
|
/*
|
|
**************************************************************************
|
|
- * Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
|
|
+ * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.
|
|
* Permission to use, copy, modify, and/or distribute this software for
|
|
* any purpose with or without fee is hereby granted, provided that the
|
|
* above copyright notice and this permission notice appear in all copies.
|
|
@@ -583,6 +583,12 @@ nss_tx_status_t nss_phys_if_set_nexthop(
|
|
struct nss_phys_if_msg nim;
|
|
|
|
NSS_VERIFY_CTX_MAGIC(nss_ctx);
|
|
+
|
|
+ if (nexthop >= NSS_MAX_NET_INTERFACES) {
|
|
+ nss_warning("%p: Invalid nexthop interface number: %d", nss_ctx, nexthop);
|
|
+ return NSS_TX_FAILURE_BAD_PARAM;
|
|
+ }
|
|
+
|
|
nss_info("%p: Phys If nexthop will be set to %d, id:%d\n", nss_ctx, nexthop, if_num);
|
|
|
|
nss_cmn_msg_init(&nim.cm, if_num, NSS_PHYS_IF_SET_NEXTHOP,
|
|
@@ -591,6 +597,7 @@ nss_tx_status_t nss_phys_if_set_nexthop(
|
|
|
|
return nss_phys_if_msg_sync(nss_ctx, &nim);
|
|
}
|
|
+EXPORT_SYMBOL(nss_phys_if_set_nexthop);
|
|
|
|
/*
|
|
* nss_get_state()
|