diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2019-05-27 08:01:50 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-05-27 08:01:49 -0700 |
| commit | cfb05dba8254dba3c9866cb08017b16a47ab89fe (patch) | |
| tree | e28cabae62559cc6c1b42651e86ce3f9e24f6e67 | |
| parent | 44607545fc3aa89888f9894a040ca7845aa16e4d (diff) | |
| parent | 779dfa61f7b11de7a88951ceac3b9dec0134083a (diff) | |
Merge "msm: ipa_v2: Protect ipa default routing table"
| -rw-r--r-- | drivers/platform/msm/ipa/ipa_v2/ipa_rt.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/platform/msm/ipa/ipa_v2/ipa_rt.c b/drivers/platform/msm/ipa/ipa_v2/ipa_rt.c index af8d9dcf8afc..007f92bcee13 100644 --- a/drivers/platform/msm/ipa/ipa_v2/ipa_rt.c +++ b/drivers/platform/msm/ipa/ipa_v2/ipa_rt.c @@ -1066,9 +1066,8 @@ static int __ipa_add_rt_rule(enum ipa_ip_type ip, const char *name, * tables */ if (!strncmp(tbl->name, IPA_DFLT_RT_TBL_NAME, IPA_RESOURCE_NAME_MAX) && - (tbl->rule_cnt > 0) && (at_rear != 0)) { - IPAERR("cannot add rule at end of tbl rule_cnt=%d at_rear=%d\n", - tbl->rule_cnt, at_rear); + (tbl->rule_cnt > 0)) { + IPAERR("cannot add rules to default rt table\n"); goto error; } @@ -1605,6 +1604,11 @@ static int __ipa_mdfy_rt_rule(struct ipa_rt_rule_mdfy *rtrule) goto error; } + if (!strcmp(entry->tbl->name, IPA_DFLT_RT_TBL_NAME)) { + IPAERR_RL("Default tbl rule cannot be modified\n"); + return -EINVAL; + } + /* Adding check to confirm still * header entry present in header table or not */ |
