Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Network Manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
network
Network Manager
Commits
852f720f
Commit
852f720f
authored
8 months ago
by
Amin Ben Romdhane
Browse files
Options
Downloads
Patches
Plain Diff
Fix pipeline
parent
a70ec812
No related branches found
No related tags found
1 merge request
!7
netmngr: add support for Device.IPv6rd. data model object
Pipeline
#189708
passed
8 months ago
Stage: static_code_analysis
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ipv6rd.c
+10
-21
10 additions, 21 deletions
src/ipv6rd.c
with
10 additions
and
21 deletions
src/ipv6rd.c
+
10
−
21
View file @
852f720f
...
@@ -91,7 +91,7 @@ static int browseIPv6rdInterfaceSettingInst(struct dmctx *dmctx, DMNODE *parent_
...
@@ -91,7 +91,7 @@ static int browseIPv6rdInterfaceSettingInst(struct dmctx *dmctx, DMNODE *parent_
static
int
get_IPv6rd_Enable
(
char
*
refparam
,
struct
dmctx
*
ctx
,
void
*
data
,
char
*
instance
,
char
**
value
)
static
int
get_IPv6rd_Enable
(
char
*
refparam
,
struct
dmctx
*
ctx
,
void
*
data
,
char
*
instance
,
char
**
value
)
{
{
// no way to disable ipv6rd for now, always enabled
// no way to disable ipv6rd for now, always enabled
*
value
=
"1"
;
*
value
=
dmstrdup
(
"1"
)
;
return
0
;
return
0
;
}
}
...
@@ -118,8 +118,6 @@ static int get_IPv6rd_InterfaceSettingNumberOfEntries(char *refparam, struct dmc
...
@@ -118,8 +118,6 @@ static int get_IPv6rd_InterfaceSettingNumberOfEntries(char *refparam, struct dmc
static
int
get_IPv6rdInterfaceSetting_Enable
(
char
*
refparam
,
struct
dmctx
*
ctx
,
void
*
data
,
char
*
instance
,
char
**
value
)
static
int
get_IPv6rdInterfaceSetting_Enable
(
char
*
refparam
,
struct
dmctx
*
ctx
,
void
*
data
,
char
*
instance
,
char
**
value
)
{
{
*
value
=
"0"
;
if
(((
struct
dm_data
*
)
data
)
->
config_section
==
NULL
)
if
(((
struct
dm_data
*
)
data
)
->
config_section
==
NULL
)
return
0
;
return
0
;
...
@@ -127,7 +125,7 @@ static int get_IPv6rdInterfaceSetting_Enable(char *refparam, struct dmctx *ctx,
...
@@ -127,7 +125,7 @@ static int get_IPv6rdInterfaceSetting_Enable(char *refparam, struct dmctx *ctx,
dmuci_get_value_by_section_string
(((
struct
dm_data
*
)
data
)
->
config_section
,
"disabled"
,
&
disabled
);
dmuci_get_value_by_section_string
(((
struct
dm_data
*
)
data
)
->
config_section
,
"disabled"
,
&
disabled
);
if
(
DM_STRCMP
(
disabled
,
"1"
)
!=
0
)
if
(
DM_STRCMP
(
disabled
,
"1"
)
!=
0
)
*
value
=
"1"
;
*
value
=
dmstrdup
(
"1"
)
;
return
0
;
return
0
;
}
}
...
@@ -171,10 +169,8 @@ static int set_IPv6rdInterfaceSetting_Alias(char *refparam, struct dmctx *ctx, v
...
@@ -171,10 +169,8 @@ static int set_IPv6rdInterfaceSetting_Alias(char *refparam, struct dmctx *ctx, v
static
int
get_IPv6rdInterfaceSetting_BorderRelayIPv4Addresses
(
char
*
refparam
,
struct
dmctx
*
ctx
,
void
*
data
,
char
*
instance
,
char
**
value
)
static
int
get_IPv6rdInterfaceSetting_BorderRelayIPv4Addresses
(
char
*
refparam
,
struct
dmctx
*
ctx
,
void
*
data
,
char
*
instance
,
char
**
value
)
{
{
if
(((
struct
dm_data
*
)
data
)
->
config_section
==
NULL
)
{
if
(((
struct
dm_data
*
)
data
)
->
config_section
==
NULL
)
*
value
=
""
;
return
0
;
return
0
;
}
dmuci_get_value_by_section_string
(((
struct
dm_data
*
)
data
)
->
config_section
,
"peeraddr"
,
value
);
dmuci_get_value_by_section_string
(((
struct
dm_data
*
)
data
)
->
config_section
,
"peeraddr"
,
value
);
return
0
;
return
0
;
...
@@ -198,12 +194,11 @@ static int set_IPv6rdInterfaceSetting_BorderRelayIPv4Addresses(char *refparam, s
...
@@ -198,12 +194,11 @@ static int set_IPv6rdInterfaceSetting_BorderRelayIPv4Addresses(char *refparam, s
static
int
get_IPv6rdInterfaceSetting_AllTrafficToBorderRelay
(
char
*
refparam
,
struct
dmctx
*
ctx
,
void
*
data
,
char
*
instance
,
char
**
value
)
static
int
get_IPv6rdInterfaceSetting_AllTrafficToBorderRelay
(
char
*
refparam
,
struct
dmctx
*
ctx
,
void
*
data
,
char
*
instance
,
char
**
value
)
{
{
if
(((
struct
dm_data
*
)
data
)
->
config_section
==
NULL
)
{
if
(((
struct
dm_data
*
)
data
)
->
config_section
==
NULL
)
*
value
=
""
;
return
0
;
return
0
;
}
// this is always true in openwrt
// this is always true in openwrt
*
value
=
"1"
;
*
value
=
dmstrdup
(
"1"
)
;
return
0
;
return
0
;
}
}
...
@@ -224,8 +219,6 @@ static int set_IPv6rdInterfaceSetting_AllTrafficToBorderRelay(char *refparam, st
...
@@ -224,8 +219,6 @@ static int set_IPv6rdInterfaceSetting_AllTrafficToBorderRelay(char *refparam, st
static
int
get_IPv6rdInterfaceSetting_SPIPv6Prefix
(
char
*
refparam
,
struct
dmctx
*
ctx
,
void
*
data
,
char
*
instance
,
char
**
value
)
static
int
get_IPv6rdInterfaceSetting_SPIPv6Prefix
(
char
*
refparam
,
struct
dmctx
*
ctx
,
void
*
data
,
char
*
instance
,
char
**
value
)
{
{
*
value
=
""
;
if
(((
struct
dm_data
*
)
data
)
->
config_section
==
NULL
)
if
(((
struct
dm_data
*
)
data
)
->
config_section
==
NULL
)
return
0
;
return
0
;
...
@@ -268,10 +261,8 @@ static int set_IPv6rdInterfaceSetting_SPIPv6Prefix(char *refparam, struct dmctx
...
@@ -268,10 +261,8 @@ static int set_IPv6rdInterfaceSetting_SPIPv6Prefix(char *refparam, struct dmctx
static
int
get_IPv6rdInterfaceSetting_IPv4MaskLength
(
char
*
refparam
,
struct
dmctx
*
ctx
,
void
*
data
,
char
*
instance
,
char
**
value
)
static
int
get_IPv6rdInterfaceSetting_IPv4MaskLength
(
char
*
refparam
,
struct
dmctx
*
ctx
,
void
*
data
,
char
*
instance
,
char
**
value
)
{
{
if
(((
struct
dm_data
*
)
data
)
->
config_section
==
NULL
)
{
if
(((
struct
dm_data
*
)
data
)
->
config_section
==
NULL
)
*
value
=
""
;
return
0
;
return
0
;
}
dmuci_get_value_by_section_string
(((
struct
dm_data
*
)
data
)
->
config_section
,
"ip4prefixlen"
,
value
);
dmuci_get_value_by_section_string
(((
struct
dm_data
*
)
data
)
->
config_section
,
"ip4prefixlen"
,
value
);
return
0
;
return
0
;
...
@@ -294,10 +285,8 @@ static int set_IPv6rdInterfaceSetting_IPv4MaskLength(char *refparam, struct dmct
...
@@ -294,10 +285,8 @@ static int set_IPv6rdInterfaceSetting_IPv4MaskLength(char *refparam, struct dmct
static
int
get_IPv6rdInterfaceSetting_AddressSource
(
char
*
refparam
,
struct
dmctx
*
ctx
,
void
*
data
,
char
*
instance
,
char
**
value
)
static
int
get_IPv6rdInterfaceSetting_AddressSource
(
char
*
refparam
,
struct
dmctx
*
ctx
,
void
*
data
,
char
*
instance
,
char
**
value
)
{
{
if
(((
struct
dm_data
*
)
data
)
->
config_section
==
NULL
)
{
if
(((
struct
dm_data
*
)
data
)
->
config_section
==
NULL
)
*
value
=
""
;
return
0
;
return
0
;
}
dmuci_get_value_by_section_string
(((
struct
dm_data
*
)
data
)
->
dmmap_section
,
"ipv4path"
,
value
);
dmuci_get_value_by_section_string
(((
struct
dm_data
*
)
data
)
->
dmmap_section
,
"ipv4path"
,
value
);
...
@@ -343,7 +332,7 @@ static int get_IPv6rdInterfaceSetting_TunnelInterface(char *refparam, struct dmc
...
@@ -343,7 +332,7 @@ static int get_IPv6rdInterfaceSetting_TunnelInterface(char *refparam, struct dmc
{
{
// Tunnel, Tunneled interfaces are not yet supported
// Tunnel, Tunneled interfaces are not yet supported
// when their support is added, we can update this function
// when their support is added, we can update this function
*
value
=
""
;
// TODO
return
0
;
return
0
;
}
}
...
@@ -351,7 +340,7 @@ static int get_IPv6rdInterfaceSetting_TunneledInterface(char *refparam, struct d
...
@@ -351,7 +340,7 @@ static int get_IPv6rdInterfaceSetting_TunneledInterface(char *refparam, struct d
{
{
// Tunnel, Tunneled interfaces are not yet supported
// Tunnel, Tunneled interfaces are not yet supported
// when their support is added, we can update this function
// when their support is added, we can update this function
*
value
=
""
;
// TODO
return
0
;
return
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment